summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author jbu <pullmoll@t-online.de>2015-02-05 11:00:41 +0100
committer jbu <pullmoll@t-online.de>2015-02-05 11:01:43 +0100
commitccfd07b5399f6dc2185a42cb1357f18274a40240 (patch)
tree45232a6e2e0f508f391eef70553cc76c7015bb81
parentd87d0bcf6ea2aeb009c56b0e802ce5cc16c75fec (diff)
Report core file position in case of a CHD hunk read error (nw)
-rw-r--r--src/tools/chdman.c5
1 files changed, 4 insertions, 1 deletions
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 &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++)