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.
pull/332/head
Patric Stout 3 years ago committed by GitHub
parent 1e564b333f
commit f997eb6ca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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];

Loading…
Cancel
Save