Selaa lähdekoodia

The last fix on comments was still missing the last char in a line if it was '*'

mingodad 8 vuotta sitten
vanhempi
sitoutus
41c6f4c40c
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      SquiLu/squirrel/sqlexer.cpp

+ 1 - 3
SquiLu/squirrel/sqlexer.cpp

@@ -218,9 +218,7 @@ SQInteger SQLexer::LexBlockComment()
 			case _SC('*'): {
 			    NEXT();
 			    if(CUR_CHAR == _SC('/')) { done = true; NEXT(); continue;}
-			    if(_want_comments) APPEND_CHAR(CUR_CHAR);
-			    //we don't want to continue from here because we need accumulate anoter '*'
-			    //because we called NEXT() just entering this block
+			    if(_want_comments) APPEND_CHAR(_SC('*')); //this is the '*' before NEXT()
 			    };
 			break;
 			case _SC('\n'): data->currentline++; break;