]> git.tdb.fi Git - libs/gl.git/commitdiff
Correctly parse consecutive *s in a comment
authorMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2019 22:07:03 +0000 (01:07 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2019 22:07:03 +0000 (01:07 +0300)
Parsing state must not be reset at ** because there may be a / after.

source/programparser.cpp

index 159c314777ecf092f3ad634204f4c2c169b0187d..3b87ea7b58b1a2a16c1a09d3cd6432c53009d73f 100644 (file)
@@ -263,7 +263,7 @@ void ProgramParser::skip_comment_and_whitespace()
                {
                        if(*iter=='/')
                                comment = 0;
                {
                        if(*iter=='/')
                                comment = 0;
-                       else
+                       else if(*iter!='*')
                                comment = 3;
                }
 
                                comment = 3;
                }