From 693ed5f03219033c7a45d63939969a18aca72078 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 1 May 2018 18:17:16 +0100 Subject: [PATCH] Exit if we try to load corrupt data (although we shouldn't really get this far). --- src/game/game.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/game.c b/src/game/game.c index bb1cac5..a0eecf0 100644 --- a/src/game/game.c +++ b/src/game/game.c @@ -343,7 +343,8 @@ void loadGame(int slot) } else { - printf("Corrupt save file\n"); + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, "Corrupt save file: %s", filename); + exit(1); } free(text);