1 parent 2448c36 commit 31bf2b8Copy full SHA for 31bf2b8
1 file changed
simplecpp.cpp
@@ -1443,8 +1443,10 @@ const simplecpp::Token* simplecpp::TokenList::lastLineTok(int maxsize) const
1443
const Token* prevTok = nullptr;
1444
int count = 0;
1445
for (const Token *tok = cback(); ; tok = tok->previous) {
1446
- if (!sameline(tok, cback()) || tok->locationchange)
+ if (!sameline(tok, cback()))
1447
break;
1448
+ if (tok->locationchange)
1449
+ return tok;
1450
if (tok->comment)
1451
continue;
1452
if (++count > maxsize)
0 commit comments