1 --- icu/source/common/ubidi.c.orig 2014-08-09 20:54:39.338833533 +0100
2 +++ icu/source/common/ubidi.c 2014-08-09 20:55:48.625469055 +0100
8 +isolatesavailable(UBiDi *pBiDi) {
9 + if (pBiDi->isolates == pBiDi->simpleIsolates) {
10 + return pBiDi->isolateCount < SIMPLE_ISOLATES_COUNT-1;
12 + return pBiDi->isolateCount < pBiDi->isolatesSize/sizeof(Isolate)-1;
16 resolveImplicitLevels(UBiDi *pBiDi,
17 int32_t start, int32_t limit,
19 /* look for the last char not a BN or LRE/RLE/LRO/RLO/PDF */
20 for(i=limit-1; i>start&&(DIRPROP_FLAG(dirProps[i])&MASK_BN_EXPLICIT); i--);
22 - if((dirProp==LRI || dirProp==RLI) && limit<pBiDi->length) {
23 + if((dirProp==LRI || dirProp==RLI) && limit<pBiDi->length && isolatesavailable(pBiDi)) {
24 pBiDi->isolateCount++;
25 pBiDi->isolates[pBiDi->isolateCount].stateImp=stateImp;
26 pBiDi->isolates[pBiDi->isolateCount].state=levState.state;