]> ocean-lang.org Git - ocean/commitdiff
scanner: fix do_strip bug.
authorNeilBrown <neilb@suse.de>
Sun, 21 Jul 2013 07:51:37 +0000 (17:51 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 21 Jul 2013 07:51:37 +0000 (17:51 +1000)
do_strip wasn't striping tabs properly

Signed-off-by: NeilBrown <neilb@suse.de>
csrc/scanner.mdc

index 06fef7d04887ba8be71fc859c4966280be2c9906..57f9e21b0c4c916af6b9cda625bcdc444ef0ae0a 100644 (file)
@@ -844,7 +844,7 @@ a flag that tells us whether or not we need to strip.
                                state->offset += 1;
                                n -= 1;
                        }
-                       while (n == 4 && state->node->code.txt[0] == '\t') {
+                       while (n == 4 && state->node->code.txt[state->offset] == '\t') {
                                state->offset += 1;
                                n -= 4;
                        }