Skip to content

Commit

Permalink
Add additional sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
totalspectrum committed Sep 27, 2023
1 parent 89657d0 commit 55d02ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,7 +1906,7 @@ EvalExpr(AST *expr, unsigned flags, int *valid, int depth)
{
return intExpr(str[rval.val]);
}
} else if (expr->left && IsIdentifier(expr->left) && IsConstExpr(expr->right)) {
} else if (expr->left && IsIdentifier(expr->left) && IsConstExpr(expr->right) && (flags & PASM_FLAG)) {
ExprVal lval;
lval = EvalExpr(expr->left, flags, valid, depth+1);
if (IsIntType(lval.type)) {
Expand Down

0 comments on commit 55d02ca

Please sign in to comment.