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.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
parent
a8259e7dbc
commit
bcde1f446d
|
@ -366,11 +366,6 @@ PH7_PRIVATE sxi32 PH7_CompileSimpleString(ph7_gen_state *pGen, sxi32 iCompileFla
|
||||||
/* Delimit the string */
|
/* Delimit the string */
|
||||||
zIn = pStr->zString;
|
zIn = pStr->zString;
|
||||||
zEnd = &zIn[pStr->nByte];
|
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)) {
|
if(SXRET_OK == GenStateFindLiteral(&(*pGen), pStr, &nIdx)) {
|
||||||
/* Already processed,emit the load constant instruction
|
/* Already processed,emit the load constant instruction
|
||||||
* and return.
|
* and return.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user