summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-01-18 23:33:57 +0000
committersmatz <smatz@openttd.org>2009-01-18 23:33:57 +0000
commit0e83fb37c0281e9065eb0b0163b6504eb8beb2e2 (patch)
treeb28688cd812685c1c8378358b8f32c6a7afee6ca /src/saveload
parenta337c47d4f21d675b6322542fefc8c995b904005 (diff)
downloadopenttd-0e83fb37c0281e9065eb0b0163b6504eb8beb2e2.tar.xz
(svn r15146) -Fix: show savegame name even when opening it failed
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/oldloader.cpp5
1 files changed, 4 insertions, 1 deletions
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));