about summary refs log tree commit diff stats
path: root/082scenario_screen.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-12-15 09:42:50 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-12-15 09:42:50 -0800
commitf10584abe988b4a510274b3b1747b87a86dbf856 (patch)
treeed3027a3f5fc7ae9b90a59899644a015b90f90c0 /082scenario_screen.cc
parent52f065c7cff49fe9868ce6a0e13d3c25653f597e (diff)
downloadmu-f10584abe988b4a510274b3b1747b87a86dbf856.tar.gz
2627
Diffstat (limited to '082scenario_screen.cc')
-rw-r--r--082scenario_screen.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/082scenario_screen.cc b/082scenario_screen.cc
index 0c21778e..433b37c8 100644
--- a/082scenario_screen.cc
+++ b/082scenario_screen.cc
@@ -224,12 +224,12 @@ void check_screen(const string& expected_contents, const int color) {
         // filter out other colors
         continue;
       }
-      if (get_or_insert(Memory, addr) != 0 && Memory[addr] == curr) {
+      if (get_or_insert(Memory, addr) != 0 && get_or_insert(Memory, addr) == curr) {
         if (color == -1 || color == get_or_insert(Memory, addr+cell_color_offset)) continue;
         // contents match but color is off
         if (Current_scenario && !Scenario_testing_scenario) {
           // genuine test in a mu file
-          raise_error << "\nF - " << Current_scenario->name << ": expected screen location (" << row << ", " << column << ", address " << addr << ", value " << no_scientific(get_or_insert(Memory, addr)) << ") to be in color " << color << " instead of " << no_scientific(Memory[addr+cell_color_offset]) << "\n" << end();
+          raise_error << "\nF - " << Current_scenario->name << ": expected screen location (" << row << ", " << column << ", address " << addr << ", value " << no_scientific(get_or_insert(Memory, addr)) << ") to be in color " << color << " instead of " << no_scientific(get_or_insert(Memory, addr+cell_color_offset)) << "\n" << end();
         }
         else {
           // just testing check_screen
@@ -250,7 +250,7 @@ void check_screen(const string& expected_contents, const int color) {
         expected_pretty[0] = ' ', expected_pretty[1] = '(', expected_pretty[2] = '\'', expected_pretty[3] = static_cast<unsigned char>(curr), expected_pretty[4] = '\'', expected_pretty[5] = ')', expected_pretty[6] = '\0';
       }
       char actual_pretty[10] = {0};
-      if (get_or_insert(Memory, addr) < 256 && !iscntrl(Memory[addr])) {
+      if (get_or_insert(Memory, addr) < 256 && !iscntrl(get_or_insert(Memory, addr))) {
         // " ('<curr>')"
         actual_pretty[0] = ' ', actual_pretty[1] = '(', actual_pretty[2] = '\'', actual_pretty[3] = static_cast<unsigned char>(get_or_insert(Memory, addr)), actual_pretty[4] = '\'', actual_pretty[5] = ')', actual_pretty[6] = '\0';
       }