bug 866544 - ignore break position at end-of-text returned by UCFindTextBreak. r=smontagu

This commit is contained in:
Jonathan Kew 2013-04-29 19:19:51 +01:00
parent e47507c912
commit 8bbf876cf8

View File

@ -31,7 +31,7 @@ NS_GetComplexLineBreaks(const PRUnichar* aText, uint32_t aLength,
aLength,
position,
&offset);
if (status != noErr)
if (status != noErr || offset >= aLength)
break;
aBreakBefore[offset] = true;
position = offset;