diff options
author | smatz <smatz@openttd.org> | 2009-01-18 23:33:57 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-01-18 23:33:57 +0000 |
commit | 0e83fb37c0281e9065eb0b0163b6504eb8beb2e2 (patch) | |
tree | b28688cd812685c1c8378358b8f32c6a7afee6ca /src | |
parent | a337c47d4f21d675b6322542fefc8c995b904005 (diff) | |
download | openttd-0e83fb37c0281e9065eb0b0163b6504eb8beb2e2.tar.xz |
(svn r15146) -Fix: show savegame name even when opening it failed
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/oldloader.cpp | 5 |
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)); |