From 0e83fb37c0281e9065eb0b0163b6504eb8beb2e2 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 18 Jan 2009 23:33:57 +0000 Subject: (svn r15146) -Fix: show savegame name even when opening it failed --- src/saveload/oldloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index 73aaa440b..4440cfd28 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -1602,7 +1602,10 @@ void GetOldSaveGameName(const char *path, const char *file, char *title, const c FILE *f = fopen(filename, "rb"); temp[0] = '\0'; // name is nul-terminated in savegame ... - if (f == NULL) return; + if (f == NULL) { + *title = '\0' + return; + ] bool broken = (fread(temp, 1, HEADER_SIZE, f) != HEADER_SIZE || !VerifyOldNameChecksum(temp)); -- cgit v1.2.3-70-g09d2