Merge pull request #9 from ksherlock/fix_null_operand_eval

Better checks for null operands
This commit is contained in:
Michael Steil 2016-04-13 14:43:40 -07:00
commit f319c607d5
2 changed files with 3 additions and 1 deletions

View File

@ -1109,7 +1109,8 @@ evaluateExpressionInternally(expressionType *expression, bool isTopLevel, fixupK
evaluateExpression(expressionType *expression, fixupKindType kindOfFixup)
{
valueType *result;
nullEvaluate(expression);
expressionFailed = FALSE;
referencesToNote[currentOperandNumber] = NULL;
result = evaluateExpressionInternally(expression, TRUE, kindOfFixup,

View File

@ -299,6 +299,7 @@ evaluateOperand(operandType *operand)
case Y_INDEXED_OPND:
result = evaluateExpression(operand->theOperand.expressionUnion,
performingFixups ? NO_FIXUP : OPERAND_FIXUP);
nullEvaluate(result);
if (operand->kindOfOperand != EXPRESSION_OPND) {
if (result->addressMode != EXPRESSION_OPND) {
error(BAD_ADDRESS_MODE_ERROR);