From 8d3b7f303f54fb7d74c1d4c4e0aec260cdb53d9b Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 3 Apr 2019 08:11:55 +0200 Subject: [PATCH] Allow to assign any value if data type is not specified. --- engine/memobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/memobj.c b/engine/memobj.c index 916827b..9f39a69 100644 --- a/engine/memobj.c +++ b/engine/memobj.c @@ -386,7 +386,7 @@ PH7_PRIVATE sxi32 PH7_CheckVarCompat(ph7_value *pObj, int nType) { * destination are of the compatible data types. */ PH7_PRIVATE sxi32 PH7_MemObjSafeStore(ph7_value *pSrc, ph7_value *pDest) { - if(pDest->iFlags == pSrc->iFlags) { + if(pDest->iFlags == 0 || pDest->iFlags == pSrc->iFlags) { PH7_MemObjStore(pSrc, pDest); } else if(pDest->iFlags & MEMOBJ_MIXED) { if(pDest->iFlags & MEMOBJ_HASHMAP) {