]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/utrie2.cpp
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / common / utrie2.cpp
index cec7224d90f5dea67e3e02560b890910acb8ec6e..8f9183bafad71fd8a457035c6d38fb417e37030e 100644 (file)
@@ -746,7 +746,7 @@ uint16_t BackwardUTrie2StringIterator::previous16() {
     codePointLimit=codePointStart;
     if(start>=codePointStart) {
         codePoint=U_SENTINEL;
-        return 0;
+        return trie->errorValue;
     }
     uint16_t result;
     UTRIE2_U16_PREV16(trie, start, codePointStart, codePoint, result);
@@ -757,7 +757,7 @@ uint16_t ForwardUTrie2StringIterator::next16() {
     codePointStart=codePointLimit;
     if(codePointLimit==limit) {
         codePoint=U_SENTINEL;
-        return 0;
+        return trie->errorValue;
     }
     uint16_t result;
     UTRIE2_U16_NEXT16(trie, codePointLimit, limit, codePoint, result);