lets be super sure in the face of falling between surrogates

Change-Id: I6d8259df3d4f2e73f9236b7c0547f87c89801082
This commit is contained in:
Caolán McNamara
2013-10-29 11:20:19 +00:00
parent cacfaa8bff
commit 8f0ecf2535

View File

@@ -205,7 +205,7 @@ cclass_Unicode::getStringType( const OUString& Text, sal_Int32 nPos, sal_Int32 n
sal_Int32 result = 0; sal_Int32 result = 0;
while (nCount && nPos < Text.getLength()) while (nCount > 0 && nPos < Text.getLength())
{ {
sal_Int32 nOrigPos = nPos; sal_Int32 nOrigPos = nPos;
result |= getCharType(Text, &nPos, 1); result |= getCharType(Text, &nPos, 1);