This commit is contained in:
parent
9acd6fbcb2
commit
5eeceb6927
10
engine/vm.c
10
engine/vm.c
@ -4836,14 +4836,14 @@ static sxi32 VmByteCodeExec(
|
|||||||
if(pObj == 0 || pVal == 0) {
|
if(pObj == 0 || pVal == 0) {
|
||||||
PH7_VmMemoryError(&(*pVm));
|
PH7_VmMemoryError(&(*pVm));
|
||||||
}
|
}
|
||||||
|
MemObjSetType(pObj, pStatic->iFlags);
|
||||||
if(SySetUsed(&pStatic->aByteCode) > 0) {
|
if(SySetUsed(&pStatic->aByteCode) > 0) {
|
||||||
/* Evaluate initialization expression (Any complex expression) */
|
/* Evaluate initialization expression (Any complex expression) */
|
||||||
VmLocalExec(&(*pVm), &pStatic->aByteCode, pVal);
|
VmLocalExec(&(*pVm), &pStatic->aByteCode, pVal);
|
||||||
}
|
rc = PH7_MemObjSafeStore(pVal, pObj);
|
||||||
MemObjSetType(pObj, pStatic->iFlags);
|
if(rc != SXRET_OK) {
|
||||||
rc = PH7_MemObjSafeStore(pVal, pObj);
|
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot assign a value of incompatible type to variable '$%z'", &pStatic->sName);
|
||||||
if(rc != SXRET_OK) {
|
}
|
||||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot assign a value of incompatible type to variable '$%z'", &pStatic->sName);
|
|
||||||
}
|
}
|
||||||
pObj->nIdx = pStatic->nIdx;
|
pObj->nIdx = pStatic->nIdx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user