From 8b3ca9564b1eeef6fd9d6296499594cfc8fec3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Fri, 14 Aug 2020 22:41:04 +0300 Subject: Continue to Frontend, fix savegame list bug --- src/save/PCSave.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/save/PCSave.cpp') diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index da8134fc..8514a2b6 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -88,7 +88,7 @@ void C_PcSave::PopulateSlotInfo() { for (int i = 0; i < SLOT_COUNT; i++) { - Slots[i + 1] = SLOT_EMPTY; + Slots[i] = SLOT_EMPTY; SlotFileName[i][0] = '\0'; SlotSaveDate[i][0] = '\0'; } @@ -108,14 +108,14 @@ C_PcSave::PopulateSlotInfo() if (file != 0) { CFileMgr::Read(file, (char*)&header, sizeof(header)); if (strncmp((char*)&header, TopLineEmptyFile, sizeof(TopLineEmptyFile)-1) != 0) { - Slots[i + 1] = SLOT_OK; + Slots[i] = SLOT_OK; memcpy(SlotFileName[i], &header.FileName, sizeof(header.FileName)); SlotFileName[i][24] = '\0'; } CFileMgr::CloseFile(file); } - if (Slots[i + 1] == SLOT_OK) { + if (Slots[i] == SLOT_OK) { if (CheckDataNotCorrupt(i, savename)) { SYSTEMTIME st; memcpy(&st, &header.SaveDateTime, sizeof(SYSTEMTIME)); @@ -147,7 +147,7 @@ C_PcSave::PopulateSlotInfo() } else { CMessages::InsertNumberInString(TheText.Get("FEC_SLC"), i + 1, -1, -1, -1, -1, -1, SlotFileName[i]); - Slots[i + 1] = SLOT_CORRUPTED; + Slots[i] = SLOT_CORRUPTED; } } } -- cgit v1.2.3