From 3abf83c87faf67a5a4d5c921ef2aaaf2228d41cc Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 12 May 2015 17:21:40 +0000 Subject: [PATCH] cpp: fixed comment issue git-svn-id: svn://ultimatepp.org/upp/trunk@8437 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CppBase/ppfile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uppsrc/CppBase/ppfile.cpp b/uppsrc/CppBase/ppfile.cpp index cab9f0c27..801998c38 100644 --- a/uppsrc/CppBase/ppfile.cpp +++ b/uppsrc/CppBase/ppfile.cpp @@ -47,8 +47,12 @@ void RemoveComments(String& l, bool& incomment) if(*s == '\"') s = SkipString(s); else - if(s[0] == '/' && s[1] == '*') + if(s[0] == '/' && s[1] == '*') { q = int(s - ~l); + break; + } + else + s++; } if(q >= 0) w = q + 2;