From ab51b030939e02e55cac6f9e779d8696013819a9 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Fri, 7 Oct 2016 17:07:39 -0700 Subject: [PATCH] Fixed line numbers being off in multi-line comments. Change-Id: I4c27892c249527980d8f52a2cca801dace70289f --- src/idl_parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index 06948bce4..c9fa1b0dc 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -352,6 +352,7 @@ CheckedError Parser::Next() { cursor_++; // TODO: make nested. while (*cursor_ != '*' || cursor_[1] != '/') { + if (*cursor_ == '\n') line_++; if (!*cursor_) return Error("end of file in comment"); cursor_++; }