diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-09 20:03:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-09 20:03:18 -0700 |
commit | 957ca9c955751d4454e7b4095f903eead9b678cc (patch) | |
tree | 2cba51b4ea76706b29879f9cc644062005683150 /081run_interactive.cc | |
parent | 65d5fb17b61ab9252137e0eb7e8ff5a1c88e376c (diff) | |
download | mu-957ca9c955751d4454e7b4095f903eead9b678cc.tar.gz |
2269
Another bugfix. Thanks Jack and Caleb Couch.
Diffstat (limited to '081run_interactive.cc')
-rw-r--r-- | 081run_interactive.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/081run_interactive.cc b/081run_interactive.cc index 81c49d42..dc46cf1f 100644 --- a/081run_interactive.cc +++ b/081run_interactive.cc @@ -286,6 +286,17 @@ get x:number, foo:offset] +mem: storing 110 in location 14 # ... +:(scenario run_interactive_with_comment) +recipe main [ + # 2 instructions, with a comment after the first + 1:address:array:number <- new [a:number <- copy 0 # abc +b:number <- copy 0 +] + 2:address:array:character, 3:address:array:character <- run-interactive 1:address:array:character +] +# no errors ++mem: storing 0 in location 3 + :(before "End Globals") string Most_recent_products; :(before "End Setup") @@ -330,7 +341,7 @@ string strip_comments(string in) { result << in.at(i); } else { - while (i < SIZE(in) && in.at(i) != '\n') + while (i+1 < SIZE(in) && in.at(i+1) != '\n') ++i; } } |