about summary refs log tree commit diff stats
path: root/072scenario_screen.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-27 17:05:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-27 17:05:34 -0700
commit8cdfed6acb211a1f3c740cb372cc8745f18d181c (patch)
tree3867d2cc3249659dc1ec658613337ee242dcd88e /072scenario_screen.cc
parentbb27fd0a0c5e0ea39f267c4106f36c80465fd14b (diff)
downloadmu-8cdfed6acb211a1f3c740cb372cc8745f18d181c.tar.gz
1488
Diffstat (limited to '072scenario_screen.cc')
-rw-r--r--072scenario_screen.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/072scenario_screen.cc b/072scenario_screen.cc
index 98342682..5675da5b 100644
--- a/072scenario_screen.cc
+++ b/072scenario_screen.cc
@@ -202,6 +202,10 @@ void check_screen(const string& expected_contents, const int color) {
       uint32_t curr = cursor.get();
       if (Memory[addr] == 0 && isspace(curr)) continue;
 //?       cerr << color << " vs " << Memory[addr+1] << '\n'; //? 1
+      if (curr == ' ' && color != -1 && color != Memory[addr+cell_color_offset]) {
+        // filter out other colors
+        continue;
+      }
       if (Memory[addr] != 0 && Memory[addr] == curr) {
         if (color == -1 || color == Memory[addr+cell_color_offset]) continue;
         // contents match but color is off
@@ -220,9 +224,6 @@ void check_screen(const string& expected_contents, const int color) {
         return;
       }
 
-      // mismatch; check if we should ignore because of the color
-      if (curr == ' ' && color != -1 && color != Memory[addr+cell_color_offset]) continue;
-
       // really a mismatch
       // can't print multi-byte unicode characters in warnings just yet. not very useful for debugging anyway.
       char expected_pretty[10] = {0};