From 9bfb599f64e00ae842bfecb60938c68f3039c9d7 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 22 Sep 2016 00:40:33 +0200 Subject: [PATCH] fixes --- src/cs_gen.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cs_gen.cc b/src/cs_gen.cc index fa0451e..a018f37 100644 --- a/src/cs_gen.cc +++ b/src/cs_gen.cc @@ -675,12 +675,12 @@ static void compileblockmain(GenState &gs, int wordtype, int prevargs) { brak--; break; case '@': { - gs.next_char(); char const *esc = gs.source; + int level = 0; while (gs.current() == '@') { + ++level; gs.next_char(); } - int level = gs.source - (esc - 1); if (brak > level) { continue; } else if (brak < level) { @@ -695,7 +695,7 @@ static void compileblockmain(GenState &gs, int wordtype, int prevargs) { concs = 1; } if (compileblockstr( - gs, ostd::ConstCharRange(start, esc - 1), true + gs, ostd::ConstCharRange(start, esc), true )) { concs++; } @@ -708,6 +708,9 @@ static void compileblockmain(GenState &gs, int wordtype, int prevargs) { gs.code.pop(); } break; + default: + gs.next_char(); + break; } } }