Skip to content
Snippets Groups Projects
Commit 0877e56d authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixed possible unsigned overflow.

parent eed0241d
No related branches found
No related tags found
No related merge requests found
......@@ -922,7 +922,10 @@ int CppQuickFixOperation::endOf(unsigned index) const
int CppQuickFixOperation::endOf(const CPlusPlus::AST *ast) const
{
return endOf(ast->lastToken() - 1);
if (unsigned end = ast->lastToken())
return endOf(end - 1);
else
return 0;
}
void CppQuickFixOperation::startAndEndOf(unsigned index, int *start, int *end) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment