Merge pull request #10376 from Jamiras/bad_chd_header

don't ignore errors from decompress_v5_map
This commit is contained in:
Autechre 2020-03-31 20:16:35 +02:00 committed by GitHub
commit f0ef3904d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -826,14 +826,13 @@ chd_error chd_open_file(RFILE *file, int mode, chd_file *parent, chd_file **chd)
if (newchd->header.version < 5)
{
err = map_read(newchd);
if (err != CHDERR_NONE)
EARLY_EXIT(err);
}
else
{
err = decompress_v5_map(newchd, &(newchd->header));
(void)err;
}
if (err != CHDERR_NONE)
EARLY_EXIT(err);
#ifdef NEED_CACHE_HUNK
/* allocate and init the hunk cache */