Prevent $base, $parent and $this from being unset.
The build has failed. Details

This commit is contained in:
Rafal Kupiec 2019-05-29 13:45:38 +02:00
parent 02471b4ccb
commit a6f7c6d847
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 4 additions and 0 deletions

View File

@ -7580,6 +7580,10 @@ static int vm_builtin_unset(ph7_context *pCtx, int nArg, ph7_value **apArg) {
PH7_VmThrowError(pCtx->pVm, PH7_CTX_ERR, "Expecting a variable not a constant"); PH7_VmThrowError(pCtx->pVm, PH7_CTX_ERR, "Expecting a variable not a constant");
} }
} else { } else {
if(pObj->iFlags != MEMOBJ_VARIABLE) {
/* Throw an error */
PH7_VmThrowError(pCtx->pVm, PH7_CTX_ERR, "Expecting a variable not AerScript statement");
}
sxu32 nIdx = pObj->nIdx; sxu32 nIdx = pObj->nIdx;
PH7_VmUnsetMemObj(&(*pVm), nIdx, FALSE); PH7_VmUnsetMemObj(&(*pVm), nIdx, FALSE);
} }