Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix string length comparison
  • Loading branch information
YoannQDQ authored and nyalldawson committed Mar 30, 2023
1 parent 443df70 commit 8328a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/codeeditors/qgscodeeditorhtml.cpp
Expand Up @@ -194,7 +194,7 @@ void QgsCodeEditorHTML::toggleComment()
const bool commented = startLineTrimmed.startsWith( commentStart ) && endLineTrimmed.endsWith( commentEnd );

// Special case, selected text is <!--> or <!--->
if ( commented && startLine == endLine && text( endLine ).trimmed() < commentStart.size() + commentEnd.size() )
if ( commented && startLine == endLine && text( endLine ).trimmed().size() < commentStart.size() + commentEnd.size() )
{
return;
}
Expand Down

0 comments on commit 8328a37

Please sign in to comment.