diff options
Diffstat (limited to 'src/tools/chdman.cpp')
-rw-r--r-- | src/tools/chdman.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 3a4277c50d1..39098a8820a 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -1660,7 +1660,9 @@ static void do_verify(parameters_map ¶ms) // fix it if requested; this also fixes the overall one so we don't need to do any more if (params.find(OPTION_FIX) != params.end()) { - input_chd.set_raw_sha1(computed_sha1); + std::error_condition err = input_chd.set_raw_sha1(computed_sha1); + if (err) + report_error(1, "Error updating SHA-1: %s", err.message()); printf("SHA-1 updated to correct value in input CHD\n"); } } @@ -1682,7 +1684,9 @@ static void do_verify(parameters_map ¶ms) // fix it if requested if (params.find(OPTION_FIX) != params.end()) { - input_chd.set_raw_sha1(computed_sha1); + std::error_condition err = input_chd.set_raw_sha1(computed_sha1); + if (err) + report_error(1, "Error updating SHA-1: %s", err.message()); printf("SHA-1 updated to correct value in input CHD\n"); } } |