diff --git a/lparser.c b/lparser.c index b0dbb65c..27daa926 100644 --- a/lparser.c +++ b/lparser.c @@ -1822,8 +1822,9 @@ static void exprstat (LexState *ls) { restassign(ls, &v, 1); } else { /* stat -> func */ - Instruction *inst = &getinstruction(fs, &v.v); + Instruction *inst; check_condition(ls, v.v.k == VCALL, "syntax error"); + inst = &getinstruction(fs, &v.v); SETARG_C(*inst, 1); /* call statement uses no results */ } }