Throw a warning when trying to typecast to resource.
The build was successful.
Details
The build was successful.
Details
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