mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Saves: Change header string to "E32SAVEGAME" (but still accept "EDuke32SAVE")
git-svn-id: https://svn.eduke32.com/eduke32@6739 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4158aa802a
commit
f4ba85b600
1 changed files with 11 additions and 5 deletions
|
@ -1334,7 +1334,7 @@ int32_t sv_saveandmakesnapshot(FILE *fil, char const *name, int8_t spot, int8_t
|
|||
|
||||
|
||||
// create header
|
||||
Bmemcpy(h.headerstr, "EDuke32SAVE", 11);
|
||||
Bmemcpy(h.headerstr, "E32SAVEGAME", 11);
|
||||
h.majorver = SV_MAJOR_VER;
|
||||
h.minorver = SV_MINOR_VER;
|
||||
h.ptrsize = sizeof(intptr_t);
|
||||
|
@ -1450,11 +1450,17 @@ int32_t sv_loadheader(int32_t fil, int32_t spot, savehead_t *h)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (Bmemcmp(h->headerstr, "EDuke32SAVE", 11))
|
||||
if (Bmemcmp(h->headerstr, "E32SAVEGAME", 11)
|
||||
#if 1
|
||||
&& Bmemcmp(h->headerstr, "EDuke32SAVE", 11)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
h->headerstr[sizeof(h->headerstr)-1] = 0;
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"EDuke32SAVE\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, h->headerstr);
|
||||
char headerCstr[sizeof(h->headerstr) + 1];
|
||||
Bmemcpy(headerCstr, h->headerstr, sizeof(h->headerstr));
|
||||
headerCstr[sizeof(h->headerstr)] = '\0';
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"E32SAVEGAME\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, headerCstr);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue