Throw a warning when trying to typecast to resource.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
parent
a7b4c6e880
commit
4af3220018
@ -448,6 +448,7 @@ PH7_PRIVATE sxi32 PH7_MemObjToCallback(ph7_value *pObj) {
|
||||
}
|
||||
PH7_PRIVATE sxi32 PH7_MemObjToResource(ph7_value *pObj) {
|
||||
sxi32 rc = SXRET_OK;
|
||||
PH7_VmThrowError(&(*pObj->pVm), PH7_CTX_WARNING, "Unsafe type casting condition, assuming default value");
|
||||
if((pObj->iFlags & MEMOBJ_RES) == 0) {
|
||||
pObj->x.iVal = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user