Merge pull request #5 from dnicolson/prevent-save-game-crash

Prevent save game crash
This commit is contained in:
Tom Kidd 2021-02-22 22:03:23 -06:00 committed by GitHub
commit a3ea3ad2be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1617,8 +1617,11 @@ void G_DoLoadGame(void)
gameaction = ga_nothing;
length = M_ReadFile(name, &savebuffer);
if (length<=0)
I_Error("Couldn't read file %s: %s", name, "(Unknown Error)");
if (length<=0) {
//I_Error("Couldn't read file %s: %s", name, "(Unknown Error)");
doom_printf("No save game found.");
return;
}
save_p = savebuffer + SAVESTRINGSIZE;
// CPhipps - read the description field, compare with supported ones