diff --git a/src/libs/utils/uncommentselection.cpp b/src/libs/utils/uncommentselection.cpp index a5da088da95..c6e4b624b0d 100644 --- a/src/libs/utils/uncommentselection.cpp +++ b/src/libs/utils/uncommentselection.cpp @@ -70,7 +70,7 @@ void Utils::unCommentSelection(QPlainTextEdit *edit) start -= 2; } - bool hasSelStart = (startPos < startText.length() - 2 + bool hasSelStart = (startPos < startText.length() - 1 && startText.at(startPos) == QLatin1Char('/') && startText.at(startPos+1) == QLatin1Char('*'));