Now these variables need to be initialized

This commit is contained in:
Henrik Rydgård 2023-02-14 22:46:32 +01:00
parent 5ce43215b9
commit 132e8eeccd
2 changed files with 4 additions and 2 deletions

View File

@ -275,8 +275,8 @@ public:
template<class T>
static Error Save(const Path &filename, const std::string &title, const char *gitVersion, T& _class)
{
u8 *buffer;
size_t sz;
u8 *buffer = nullptr;
size_t sz = 0;
Error error = MeasureAndSavePtr(_class, &buffer, &sz);
// SaveFile takes ownership of buffer (malloc/free)

View File

@ -806,6 +806,8 @@ namespace SaveState
bool HandleLoadFailure()
{
WARN_LOG(SAVESTATE, "HandleLoadFailure - trying a rewind state.");
// Okay, first, let's give the rewind state a shot - maybe we can at least not reset entirely.
// Even if this was a rewind, maybe we can still load a previous one.
CChunkFileReader::Error result;