diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 15:40:07 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 15:40:07 -0400 |
commit | 8f86708daa697274a39f8b0af42291a4ed4573eb (patch) | |
tree | b65d71d2cdc88f7825f3e4f129c16a161d498361 /compiler.c | |
parent | 4c78377a46884d66ba5c2a622382b9a205673e4f (diff) |
Don't include next control
Diffstat (limited to 'compiler.c')
-rw-r--r-- | compiler.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5613,7 +5613,8 @@ void p2_compile_control(Scope *s, Function *f, CompData *out, Vector *tokens, si vect_push_string(&out->text, ": ; Start label\n"); // Main loop statements - for(; *pos <= end; *pos = tnsl_next_non_nl(tokens, *pos)) { + *pos = tnsl_next_non_nl(tokens, *pos - 1); + for(; *pos < end; *pos = tnsl_next_non_nl(tokens, *pos)) { t = vect_get(tokens, *pos); if (tok_str_eq(t, "/;") || tok_str_eq(t, ";;")) { size_t b_open = *pos; |