prevent `lda @y` or `lda @x` (which is accepted by the parser) from crashing.
This commit is contained in:
parent
4cc8c97be5
commit
752bd31a3f
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue