office-gobmx/external/icu/icu4c-icu11100.patch.1
Caolán McNamara f9d3e0f57c upgrade to icu 54
Change-Id: I4d32ac386ff8b69bee4319e673769917045d9450
Reviewed-on: https://gerrit.libreoffice.org/13547
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-19 13:02:53 +00:00

26 lines
1 KiB
Groff

--- icu/source/common/ubidi.c.orig 2014-08-09 20:54:39.338833533 +0100
+++ icu/source/common/ubidi.c 2014-08-09 20:55:48.625469055 +0100
@@ -2096,6 +2096,14 @@
return DirProp_ON;
}
+static int
+isolatesavailable(UBiDi *pBiDi) {
+ if (pBiDi->isolates == pBiDi->simpleIsolates) {
+ return pBiDi->isolateCount < SIMPLE_ISOLATES_COUNT-1;
+ }
+ return pBiDi->isolateCount < pBiDi->isolatesSize/sizeof(Isolate)-1;
+}
+
static void
resolveImplicitLevels(UBiDi *pBiDi,
int32_t start, int32_t limit,
@@ -2239,7 +2247,7 @@
/* look for the last char not a BN or LRE/RLE/LRO/RLO/PDF */
for(i=limit-1; i>start&&(DIRPROP_FLAG(dirProps[i])&MASK_BN_EXPLICIT); i--);
dirProp=dirProps[i];
- if((dirProp==LRI || dirProp==RLI) && limit<pBiDi->length) {
+ if((dirProp==LRI || dirProp==RLI) && limit<pBiDi->length && isolatesavailable(pBiDi)) {
pBiDi->isolateCount++;
pBiDi->isolates[pBiDi->isolateCount].stateImp=stateImp;
pBiDi->isolates[pBiDi->isolateCount].state=levState.state;