Prevent save game crash

This commit is contained in:
Dave Nicolson 2020-10-18 18:59:13 +02:00
parent 5f0672a5aa
commit c1d08d3744

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