diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-04-27 09:07:53 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-04-27 09:07:53 -0700 |
commit | b8263692a6f2865482abbc21eae5a4e5163ab725 (patch) | |
tree | b1b938d4a83cf2b420001c9188194a5800d12eb2 /022arithmetic.cc | |
parent | f6645643953eeb0a493d258759a4421505d13539 (diff) | |
download | mu-b8263692a6f2865482abbc21eae5a4e5163ab725.tar.gz |
3841
Use the real original instruction in error messages. Thanks Ella Couch.
Diffstat (limited to '022arithmetic.cc')
-rw-r--r-- | 022arithmetic.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/022arithmetic.cc b/022arithmetic.cc index 7b74264f..0b842dd4 100644 --- a/022arithmetic.cc +++ b/022arithmetic.cc @@ -273,7 +273,7 @@ case DIVIDE_WITH_REMAINDER: { long long int a = static_cast<long long int>(ingredients.at(0).at(0)); long long int b = static_cast<long long int>(ingredients.at(1).at(0)); if (b == 0) { - raise << maybe(current_recipe_name()) << "divide by zero in '" << to_original_string(current_instruction()) << "'\n" << end(); + raise << maybe(current_recipe_name()) << "divide by zero in '" << current_instruction().original_string << "'\n" << end(); products.resize(2); products.at(0).push_back(0); products.at(1).push_back(0); @@ -355,7 +355,7 @@ case SHIFT_LEFT: { int b = static_cast<int>(ingredients.at(1).at(0)); products.resize(1); if (b < 0) { - raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << to_original_string(current_instruction()) << "'\n" << end(); + raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << current_instruction().original_string << "'\n" << end(); products.at(0).push_back(0); break; } @@ -426,7 +426,7 @@ case SHIFT_RIGHT: { int b = static_cast<int>(ingredients.at(1).at(0)); products.resize(1); if (b < 0) { - raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << to_original_string(current_instruction()) << "'\n" << end(); + raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << current_instruction().original_string << "'\n" << end(); products.at(0).push_back(0); break; } |