From d3ae1c1bf4bd3a8943dc2ce3aa2e66cb0bd0013c Mon Sep 17 00:00:00 2001 From: belliash Date: Mon, 6 May 2019 18:38:56 +0200 Subject: [PATCH] Only identifiers should be allowed as constant name. --- engine/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/compiler.c b/engine/compiler.c index 5718674..a36e8f3 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -1351,7 +1351,7 @@ static sxi32 PH7_CompileConstant(ph7_gen_state *pGen) { char *zName; sxi32 rc; pGen->pIn++; /* Jump the 'const' keyword */ - if(pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & (PH7_TK_SSTR | PH7_TK_DSTR | PH7_TK_ID | PH7_TK_KEYWORD)) == 0) { + if(pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & PH7_TK_ID) == 0) { /* Invalid constant name */ PH7_GenCompileError(pGen, E_ERROR, nLine, "const: Invalid constant name"); }