ICU-4724 ParagraphLayout::isComplex() must call uscript_closeRun() before returning.

X-SVN-Rev: 18450
This commit is contained in:
Eric Mader 2005-08-18 17:46:37 +00:00
parent 596c2520a7
commit 8a4284c933

View File

@ -457,14 +457,17 @@ le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count)
UErrorCode scriptStatus = U_ZERO_ERROR;
UScriptCode scriptCode = USCRIPT_INVALID_CODE;
UScriptRun *sr = uscript_openRun(chars, count, &scriptStatus);
le_bool result = FALSE;
while (uscript_nextRun(sr, NULL, NULL, &scriptCode)) {
if (isComplex(scriptCode)) {
return TRUE;
result = TRUE;
break;
}
}
return FALSE;
uscript_closeRun(sr);
return result;
}
le_int32 ParagraphLayout::getAscent() const