diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 11:20:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 11:23:40 +0000 |
commit | 8f0ecf253531963144d3d1c9ee5c12a6cda99c4e (patch) | |
tree | 3889fcd51d8a61be928973d2fae902904f280229 /i18npool/source | |
parent | cacfaa8bff333c8eb8080a52eb7db80b2f65ed43 (diff) |
lets be super sure in the face of falling between surrogates
Change-Id: I6d8259df3d4f2e73f9236b7c0547f87c89801082
Diffstat (limited to 'i18npool/source')
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 56550597e1d4..a729ca8f4c3b 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -205,7 +205,7 @@ cclass_Unicode::getStringType( const OUString& Text, sal_Int32 nPos, sal_Int32 n sal_Int32 result = 0; - while (nCount && nPos < Text.getLength()) + while (nCount > 0 && nPos < Text.getLength()) { sal_Int32 nOrigPos = nPos; result |= getCharType(Text, &nPos, 1); |