Fix crash in the code generator when compiling a (now illegal, because

"var" is a reserved word) expresssion of the vorm "var=<expr>".
This commit is contained in:
andy
2005-04-18 20:43:29 +00:00
parent 966331dac7
commit 8ea41af5c4

View File

@@ -155,7 +155,7 @@ static int genLValue(struct Parser* p, struct Token* t)
genExpr(p, LEFT(t));
genExpr(p, RIGHT(t));
return OP_INSERT;
} else if(t->type == TOK_VAR && RIGHT(t)->type == TOK_SYMBOL) {
} else if(t->type == TOK_VAR && RIGHT(t) && RIGHT(t)->type == TOK_SYMBOL) {
genScalarConstant(p, RIGHT(t));
return OP_SETLOCAL;
} else {