From dfac0f6ab2e7660ccd9d101e239b901c168937a8 Mon Sep 17 00:00:00 2001 From: Lartu <11744462+Lartu@users.noreply.github.com> Date: Thu, 18 Apr 2024 02:43:04 -0300 Subject: [PATCH] Fix bug when ordering chTexts --- src/ldpl_lib/ldpl_lib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ldpl_lib/ldpl_lib.cpp b/src/ldpl_lib/ldpl_lib.cpp index 6414b3a..4969fec 100644 --- a/src/ldpl_lib/ldpl_lib.cpp +++ b/src/ldpl_lib/ldpl_lib.cpp @@ -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) { @@ -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) { @@ -904,4 +904,4 @@ ldpl_list utf8_split_list(chText haystack, chText needle) { result.inner_collection.push_back(charat(haystack, i)); } return result; -} \ No newline at end of file +}