From 0600edd49d06224eafb6fb096f42944722da92b1 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 12 Oct 2019 00:06:30 +0300 Subject: Fixed save game Load/Save failed assertion on Debug build --- src/core/common.h | 2 +- src/core/re3.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/common.h b/src/core/common.h index 3ea37071..920b7108 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -319,7 +319,7 @@ _TWEEKCLASS(CTweakFloat, float); #undef _TWEEKCLASS #ifdef VALIDATE_SAVE_SIZE -static int32 _bufBytesRead; +extern int32 _bufBytesRead; #define INITSAVEBUF _bufBytesRead = 0; #define VALIDATESAVEBUF(b) assert(_bufBytesRead == b); #else diff --git a/src/core/re3.cpp b/src/core/re3.cpp index b9b5c76e..c8b50d55 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -447,6 +447,10 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons OutputDebugStringA(buff); } +#ifdef VALIDATE_SAVE_SIZE +int32 _bufBytesRead; +#endif + void patch() { -- cgit v1.2.3