Skip to content

Commit

Permalink
Prevent save game crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Oct 18, 2020
1 parent 5f0672a commit c1d08d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/prboom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1d08d3

Please sign in to comment.