From 8ea41af5c4fa10bd0285d1612b7a693c78344132 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 18 Apr 2005 20:43:29 +0000 Subject: [PATCH] Fix crash in the code generator when compiling a (now illegal, because "var" is a reserved word) expresssion of the vorm "var=". --- simgear/nasal/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/nasal/codegen.c b/simgear/nasal/codegen.c index c909c928..9451b533 100644 --- a/simgear/nasal/codegen.c +++ b/simgear/nasal/codegen.c @@ -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 { -- 2.39.5