Invert the logic. Variable needs to be declared.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
66b55e35a9
commit
e4dc9f641e
|
@ -3981,12 +3981,12 @@ static sxi32 VmByteCodeExec(
|
|||
/* Query the local frame */
|
||||
pEntry = SyHashGet(&pFrame->hVar, (const void *)sName.zString, sName.nByte);
|
||||
if(pEntry) {
|
||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Referenced variable name '%z' already exists", &sName);
|
||||
} else {
|
||||
rc = SyHashInsert(&pFrame->hVar, (const void *)sName.zString, sName.nByte, SX_INT_TO_PTR(nIdx));
|
||||
if(rc == SXRET_OK) {
|
||||
PH7_VmRefObjInstall(&(*pVm), nIdx, SyHashLastEntry(&pFrame->hVar), 0, 0);
|
||||
}
|
||||
} else {
|
||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Referenced variable name '%z' does not exists", &sName);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue