From 407fb09e8f0ab2a9df614fb0525b9f4f64d98695 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 25 Apr 2019 19:24:53 +0200 Subject: [PATCH] Throw an error only if this is not the end of tokens stream. --- engine/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/compiler.c b/engine/compiler.c index 5dbe266..9a93a2e 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -2289,7 +2289,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) { break; } else if(pGen->pIn->nType & PH7_TK_COMMA) { pGen->pIn++; - } else { + } else if(pGen->pIn < pGen->pEnd) { PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Unexpected token '%z'", &pGen->pIn->sData); } }