From bcde1f446d7c9651f67cc7a490621f871b8156e4 Mon Sep 17 00:00:00 2001 From: Piotr Likoski Date: Mon, 6 Aug 2018 16:13:49 +0200 Subject: [PATCH] It does not matter if it is empty string or not, we want to process it. Empty string should not ever been even considered as a NULL. Fixing #35. --- engine/compiler.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/engine/compiler.c b/engine/compiler.c index 36e4320..bfdb598 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -366,11 +366,6 @@ PH7_PRIVATE sxi32 PH7_CompileSimpleString(ph7_gen_state *pGen, sxi32 iCompileFla /* Delimit the string */ zIn = pStr->zString; zEnd = &zIn[pStr->nByte]; - if(zIn >= zEnd) { - /* Empty string,load NULL */ - PH7_VmEmitInstr(pGen->pVm, PH7_OP_LOADC, 0, 0, 0, 0); - return SXRET_OK; - } if(SXRET_OK == GenStateFindLiteral(&(*pGen), pStr, &nIdx)) { /* Already processed,emit the load constant instruction * and return.