From ccfd07b5399f6dc2185a42cb1357f18274a40240 Mon Sep 17 00:00:00 2001 From: jbu Date: Thu, 5 Feb 2015 11:00:41 +0100 Subject: [PATCH] Report core file position in case of a CHD hunk read error (nw) --- src/tools/chdman.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/chdman.c b/src/tools/chdman.c index c71f7d2b94d..9eee05b8826 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -2588,7 +2588,10 @@ static void do_extract_ld(parameters_t ¶ms) // 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++)