diff --git a/Hooking.cpp b/Hooking.cpp index 53f39f6..5bb8308 100644 --- a/Hooking.cpp +++ b/Hooking.cpp @@ -154,6 +154,7 @@ void __cdecl EVENT_FontPrint(char* fmt, ...) va_start(vl, fmt); char str[1024]; // size same as game buffer vsprintf_s(str, fmt, vl); + va_end(vl); FONT_PrintFormatted(str); } diff --git a/game/font.cpp b/game/font.cpp index 017233e..fe382aa 100644 --- a/game/font.cpp +++ b/game/font.cpp @@ -46,6 +46,7 @@ void FONT_Print(const char* fmt, ...) va_start(va, fmt); vsprintf_s(formatted, fmt, va); + va_end(va); Font__PrintFormatted(gMainFont, formatted, false); } diff --git a/game/font.hpp b/game/font.hpp index 68cbb68..b638bd9 100644 --- a/game/font.hpp +++ b/game/font.hpp @@ -14,4 +14,6 @@ void FONT_SetCursor(float x, float y); #define gMainFont *(void**)0x7D1800 #elif TR7 #define gMainFont *(void**)ADDR(0x1088A2C, 0x107F680) -#endif \ No newline at end of file +#elif TR8 + #define gMainFont *(void**)0x9DE6D4 +#endif