Skip to content

Commit

Permalink
added some more special chars, to avoid bad output
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Sep 6, 2015
1 parent 5a85f60 commit a00bf72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/groovy/net/zomis/brainf/analyze/Brainalyze.groovy
Expand Up @@ -73,8 +73,8 @@ class Brainalyze implements BrainfuckListener {
String hexAddress = String.format("%04X", i)
String decAddress = String.format("%06d", i)

boolean space = value == 13 || value == 10 || value == 9 // if tab or new line
char chrValue = space ? 32 : tapeValues[i];
boolean specialChar = value >= 0 && value <= 13
char chrValue = specialChar ? 32 : tapeValues[i];
String decValue = String.format("%6d", value);

String reads = String.format("%6d", memoryRead[i]);
Expand Down

0 comments on commit a00bf72

Please sign in to comment.