aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-02-07 16:24:27 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-02-07 16:24:27 -0500
commit1d092d70a3c941920da6fb25899bac0aec5cf6bf (patch)
tree0a420e48248295f3b53652d9aeea721510f3a699
parent2b8cf5e771cac4c2b087dc96a7ca05a459f630b5 (diff)
loop fix
-rw-r--r--parser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/parser.c b/parser.c
index bd540e0..ac739a0 100644
--- a/parser.c
+++ b/parser.c
@@ -186,18 +186,17 @@ int idoline(interpreter *interp, const char *line)
loop:
ooffset = 0;
offset = 0;
+ skipblank(line, eol, &offset);
- if (line[0] == '#') {
+ if (line[offset] == '#') {
goto norun;
} else if (interp->indent > 0) {
- skipblank(line, eol, &offset);
if (!strcmp(line + offset, "end"))
interp->indent--;
goto norun;
}
// step 1 - convert to tokens
- skipblank(line, eol, &offset);
while (!eol(line[offset])) {
if (offset > 0 && line[offset] == '>') {
offset++;