include/o3tl/string_view.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f614e082055dd3cad9885d6e1968d71f1e1b5a05
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri May 5 08:08:02 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri May 5 10:36:38 2023 +0200

    Fix typo in assert
    
    I accidentally broke this in fa0c012d6c06e9a92093dacf997fe3151272648e 
"Provide
    std::u16string_view based o3tl::iterateCodePoints" when moving the body of 
code
    from rtl_uString_iterateCodePoints to here and then adapting it from 
sal_Int32-
    base OUString to std::size_t-based std::u16string_view.
    
    Change-Id: I5bd97413ac8c8482f409ad5be3797fef47191d33
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151409
    Tested-by: Stephan Bergmann <sberg...@redhat.com>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index 2609a32efe35..b5b64d5991dd 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -527,7 +527,7 @@ inline sal_uInt32 iterateCodePoints(std::u16string_view 
string, std::size_t* ind
     }
     while (incrementCodePoints < 0)
     {
-        assert(n >= 0);
+        assert(n > 0);
         cu = string[--n];
         if (rtl::isLowSurrogate(cu) && n != 0 && rtl::isHighSurrogate(string[n 
- 1]))
         {

Reply via email to