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 454f28ead0
commit 519ff70080

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;