diff --git a/r5dev/squirrel/sqapi.cpp b/r5dev/squirrel/sqapi.cpp index 1cd017d7..c4a3bb52 100644 --- a/r5dev/squirrel/sqapi.cpp +++ b/r5dev/squirrel/sqapi.cpp @@ -11,13 +11,13 @@ //--------------------------------------------------------------------------------- SQChar* sq_getstring(HSQUIRRELVM v, SQInteger i) { - return *(char**)(v->_stackbase + 0x10 * static_cast(i) + 0x8) + 0x40; + return *reinterpret_cast(*reinterpret_cast(&v->_stackbase) + 0x10i64 * i + 0x8) + 0x40; } //--------------------------------------------------------------------------------- SQInteger sq_getinteger(HSQUIRRELVM v, SQInteger i) { - return *(SQInteger*)(v->_stackbase + 0x10 * static_cast(i) + 0x8); + return *reinterpret_cast(*reinterpret_cast(&v->_stackbase) + 0x10i64 * i + 0x8); } //---------------------------------------------------------------------------------