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:
		| @@ -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; | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user