Skip to content

Commit

Permalink
Fix bug when ordering chTexts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lartu authored Apr 18, 2024
1 parent bd7001a commit dfac0f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ldpl_lib/ldpl_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ bool operator<(const chText &c1, const chText &c2) {
else if (c1.buffer[i] > c2.buffer[i])
return false;
}
return false;
return c1.buffer.size() < c2.buffer.size();
}

bool operator>(const chText &c1, const chText &c2) {
Expand All @@ -470,7 +470,7 @@ bool operator>(const chText &c1, const chText &c2) {
else if (c1.buffer[i] < c2.buffer[i])
return false;
}
return false;
return c1.buffer.size() > c2.buffer.size();
}

bool operator!=(const chText &ch1, const chText &ch2) {
Expand Down Expand Up @@ -904,4 +904,4 @@ ldpl_list<chText> utf8_split_list(chText haystack, chText needle) {
result.inner_collection.push_back(charat(haystack, i));
}
return result;
}
}

0 comments on commit dfac0f6

Please sign in to comment.