From bdf2c219aba48a656c25c6053818d61937e32e9c Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 29 Oct 2022 21:09:53 +0300 Subject: [PATCH] Fix error check --- src/loadsave.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loadsave.cc b/src/loadsave.cc index a23c01f..1fccaef 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -2435,7 +2435,7 @@ static int _SlotMap2Game(File* stream) debugPrint("LOADSAVE: in SlotMap2Game\n"); int v2; - if (fileReadInt32(stream, &v2) == 1) { + if (fileReadInt32(stream, &v2) == -1) { debugPrint("LOADSAVE: returning 1\n"); return -1; }