diff --git a/src/libs/utils/uncommentselection.cpp b/src/libs/utils/uncommentselection.cpp index facae876716..06fe12ce31f 100644 --- a/src/libs/utils/uncommentselection.cpp +++ b/src/libs/utils/uncommentselection.cpp @@ -154,7 +154,7 @@ void Utils::unCommentSelection(QPlainTextEdit *edit, const CommentDefinition &de start -= multiLineStartLength; } - bool hasSelStart = (startPos < startText.length() - multiLineStartLength + bool hasSelStart = (startPos <= startText.length() - multiLineStartLength && isComment(startText, startPos, definition,