Fix #6666: Mismatched parentheses in RTL languages

This commit is contained in:
pnda
2019-04-06 21:03:20 +02:00
committed by Michael Lutz
parent 6f28a0c051
commit a35b43ce93
2 changed files with 11 additions and 10 deletions

View File

@@ -208,7 +208,7 @@ public:
LEErrorCode status = LE_NO_ERROR;
/* ParagraphLayout does not copy "buff", so it must stay valid.
* "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */
icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, nullptr, nullptr, nullptr, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, nullptr, nullptr, nullptr, _current_text_dir == TD_RTL ? 1 : 0, false, status);
if (status != LE_NO_ERROR) {
delete p;
return nullptr;