Skip to content

Commit 157f79d

Browse files
Update tokenize.cpp
1 parent 04091bd commit 157f79d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8960,7 +8960,7 @@ void Tokenizer::findGarbageCode() const
89608960
// count number of semicolons
89618961
int semicolons = 0, colons = 0;
89628962
const Token* const endTok = tok->linkAt(1);
8963-
for (tok = tok->tokAt(2); tok != endTok; tok = tok->next()) {
8963+
for (tok = tok->tokAt(2); tok && tok != endTok; tok = tok->next()) {
89648964
if (const Token* lam = findLambdaEndTokenWithoutAST(tok)) {
89658965
tok = lam;
89668966
continue;

0 commit comments

Comments
 (0)