summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-08 20:30:44 +0200
committerGitHub <noreply@github.com>2021-06-08 20:30:44 +0200
commitf997eb6ca4177b577387306b4c15ec4815f0f13c (patch)
treef82fb53168d8fa51d1f39b4a1e086fffe11c9223 /src/saveload
parent1e564b333fa2d7bde2f21d7a05bb3e81305185c5 (diff)
downloadopenttd-f997eb6ca4177b577387306b4c15ec4815f0f13c.tar.xz
Fix: compatible NewGRFs in crash-log reported wrong md5 (#9340)
The text suggests it reports the original md5, but it does in fact report the replaced md5. Now it reports both.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index f60c12b91..ff2159996 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -402,9 +402,11 @@ static void CDECL HandleSavegameLoadCrash(int signum)
for (const GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
if (HasBit(c->flags, GCF_COMPATIBLE)) {
const GRFIdentifier *replaced = GetOverriddenIdentifier(c);
- char buf[40];
- md5sumToString(buf, lastof(buf), replaced->md5sum);
- p += seprintf(p, lastof(buffer), "NewGRF %08X (checksum %s) not found.\n Loaded NewGRF \"%s\" with same GRF ID instead.\n", BSWAP32(c->ident.grfid), buf, c->filename);
+ char original_md5[40];
+ char replaced_md5[40];
+ md5sumToString(original_md5, lastof(original_md5), c->original_md5sum);
+ md5sumToString(replaced_md5, lastof(replaced_md5), replaced->md5sum);
+ p += seprintf(p, lastof(buffer), "NewGRF %08X (checksum %s) not found.\n Loaded NewGRF \"%s\" (checksum %s) with same GRF ID instead.\n", BSWAP32(c->ident.grfid), original_md5, c->filename, replaced_md5);
}
if (c->status == GCS_NOT_FOUND) {
char buf[40];