Report core file position in case of a CHD hunk read error (nw)

This commit is contained in:
jbu 2015-02-05 11:00:41 +01:00
parent d87d0bcf6e
commit ccfd07b539

View File

@ -2588,7 +2588,10 @@ static void do_extract_ld(parameters_t &params)
// read the hunk into the buffers
chd_error err = input_chd.read_hunk(framenum, NULL);
if (err != CHDERR_NONE)
report_error(1, "Error reading hunk %" I64FMT "d from CHD file (%s): %s\n", framenum, params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err));
{
UINT64 filepos = core_ftell(input_chd);
report_error(1, "Error reading hunk %" I64FMT "d at offset %" I64FMT "d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err));
}
// write audio
for (int chnum = 0; chnum < channels; chnum++)