Fixed: Truncated pointer on 64bit system

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
Nimetu 5 years ago
parent f11bc06541
commit a6a8cb99f5

@ -368,7 +368,7 @@ CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(std::string cons
{ {
clean(); clean();
std::string* const strPt = new std::string(str); std::string* const strPt = new std::string(str);
_valp = *((int*)&strPt); _valp = *((uintptr_t*)&strPt);
_type = EString; _type = EString;
return *this; return *this;
} }
@ -376,7 +376,7 @@ inline
CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc) CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc)
{ {
clean(); clean();
_valp = *((int*)&sc); _valp = *((uintptr_t*)&sc);
_type = EContext; _type = EContext;
return *this; return *this;
} }

Loading…
Cancel
Save