From e6699c66ede2d482fe2a6d16c3367913c5116dad Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 15 Jul 2014 13:15:21 +0100 Subject: [PATCH] Fix comment parsing error in CommandManager --- src/command_manager.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/command_manager.cc b/src/command_manager.cc index b01dea2b..81cd1c02 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -172,8 +172,11 @@ void skip_blanks_and_comments(StringView base, ByteCount& pos) pos += 2; else if (base[pos] == '#') { - while (pos != length and base[pos] != '\n') - ++pos; + while (pos != length) + { + if (base[pos++] == '\n') + break; + } } else break;