From 8f0ecf253531963144d3d1c9ee5c12a6cda99c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 29 Oct 2013 11:20:19 +0000 Subject: [PATCH] lets be super sure in the face of falling between surrogates Change-Id: I6d8259df3d4f2e73f9236b7c0547f87c89801082 --- i18npool/source/characterclassification/cclass_unicode.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);