From 825c5ca09a999aa492bd1137babef5540ff5956e Mon Sep 17 00:00:00 2001 From: John Peterson Date: Thu, 6 Jun 2013 09:00:52 +0200 Subject: [PATCH] Equalising the 32 and 64 bit state compression because that allow loading both --- Source/Core/Core/Src/State.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp index f41b32485e..24647c143a 100644 --- a/Source/Core/Core/Src/State.cpp +++ b/Source/Core/Core/Src/State.cpp @@ -59,7 +59,7 @@ static Common::Event g_compressAndDumpStateSyncEvent; static std::thread g_save_thread; // Don't forget to increase this after doing changes on the savestate system -static const u32 STATE_VERSION = 19; +static const u32 STATE_VERSION = 20; enum { @@ -257,7 +257,7 @@ void CompressAndDumpState(CompressAndDumpState_args save_args) lzo_uint i = 0; while (true) { - lzo_uint cur_len = 0; + lzo_uint32 cur_len = 0; lzo_uint out_len = 0; if ((i + IN_LEN) >= buffer_size) @@ -269,7 +269,7 @@ void CompressAndDumpState(CompressAndDumpState_args save_args) PanicAlertT("Internal LZO Error - compression failed"); // The size of the data to write is 'out_len' - f.WriteArray(&out_len, 1); + f.WriteArray((lzo_uint32*)&out_len, 1); f.WriteBytes(out, out_len); if (cur_len != IN_LEN) @@ -379,7 +379,7 @@ void LoadFileStateData(const std::string& filename, std::vector& ret_data) lzo_uint i = 0; while (true) { - lzo_uint cur_len = 0; // number of bytes to read + lzo_uint32 cur_len = 0; // number of bytes to read lzo_uint new_len = 0; // number of bytes to write if (!f.ReadArray(&cur_len, 1))