From b536e88fdba575e96bc7e69964d7e96b73fa941b Mon Sep 17 00:00:00 2001 From: uniboi <64006268+uniboi@users.noreply.github.com> Date: Tue, 18 Apr 2023 22:49:46 +0000 Subject: Fix getvector returning garbage data (#448) * fix vector garbage data * change typedef to use IDA's types --- NorthstarDLL/squirrel/squirrel.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NorthstarDLL/squirrel/squirrel.h b/NorthstarDLL/squirrel/squirrel.h index 5708c836..aa728fa5 100644 --- a/NorthstarDLL/squirrel/squirrel.h +++ b/NorthstarDLL/squirrel/squirrel.h @@ -216,8 +216,7 @@ class SquirrelManagerBase inline Vector3 getvector(HSquirrelVM* sqvm, const SQInteger stackpos) { - float* pRet = __sq_getvector(sqvm, stackpos); - return *(Vector3*)&pRet; + return *(Vector3*)__sq_getvector(sqvm, stackpos); } inline int sq_getfunction(HSquirrelVM* sqvm, const char* name, SQObject* returnObj, const char* signature) -- cgit v1.2.3