From bf043adb738b220ae1e013729f32f55a756117e3 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 2 Aug 2018 01:21:19 +0000 Subject: [PATCH] [facepalm emoji] git-svn-id: https://svn.eduke32.com/eduke32@6962 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/savegame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/savegame.cpp b/source/duke3d/src/savegame.cpp index 707e66264..330062826 100644 --- a/source/duke3d/src/savegame.cpp +++ b/source/duke3d/src/savegame.cpp @@ -208,8 +208,8 @@ static void ReadSaveGameHeaders_Internal(void) g_internalsaves = (menusave_t *)Xrealloc(g_internalsaves, internalsavesize); - if (internalsavesize) - g_internalsaves->clear(); + for (size_t x = 0; x < numfiles; ++x) + g_internalsaves[x].clear(); g_numinternalsaves = 0; ReadSaveGameHeaders_CACHE1D(findfiles_default); @@ -228,8 +228,8 @@ static void ReadSaveGameHeaders_Internal(void) g_menusaves = (menusave_t *)Xrealloc(g_menusaves, menusavesize); - if (menusavesize) - g_menusaves->clear(); + for (size_t x = 0; x < g_nummenusaves; ++x) + g_menusaves[x].clear(); for (size_t x = g_numinternalsaves-1, y = 0; x < g_numinternalsaves; --x) {