From b7fafa6b651047f485b2551dfda917528bca8bf6 Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Mon, 8 May 2023 19:15:53 +0100 Subject: [PATCH] temporary modsystem fix this is a temporary fix for the incorrect g_pAlignedMemAlloc behaviour g_pAlignedMemAlloc is supposed to be a pointer to a struct of 2 functions, but it is a pointer to a class with a virtual function table, causing invalid function addresses This causes an access violation on this call This should be fixed properly in the future --- r5dev/vscript/languages/squirrel_re/vsquirrel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/vscript/languages/squirrel_re/vsquirrel.cpp b/r5dev/vscript/languages/squirrel_re/vsquirrel.cpp index 19003c54..6345661c 100644 --- a/r5dev/vscript/languages/squirrel_re/vsquirrel.cpp +++ b/r5dev/vscript/languages/squirrel_re/vsquirrel.cpp @@ -193,7 +193,7 @@ void CSquirrelVM::CompileModScripts() if (rson) { RSON_Free(rson, g_pAlignedMemAlloc); - g_pAlignedMemAlloc->Free(rson); + //g_pAlignedMemAlloc->Free(rson); // TODO: fix g_pAlignedMemAlloc and free this properly } } }