Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: source/common/ubidi.c

Issue 566073003: Fix a bug in ICU's bidi handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/icu52/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/bidi.patch ('k') | source/common/ubidiimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/ubidi.c
===================================================================
--- source/common/ubidi.c (revision 291619)
+++ source/common/ubidi.c (working copy)
@@ -671,10 +671,10 @@
bd->isoRuns[0].lastStrongPos=bd->isoRuns[0].contextPos=0;
if(pBiDi->openingsMemory) {
bd->openings=pBiDi->openingsMemory;
- bd->openingsSize=pBiDi->openingsSize;
+ bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
} else {
bd->openings=bd->simpleOpenings;
- bd->openingsSize=SIMPLE_OPENINGS_SIZE;
+ bd->openingsCount=SIMPLE_OPENINGS_SIZE;
}
bd->isNumbersSpecial=bd->pBiDi->reorderingMode==UBIDI_REORDER_NUMBERS_SPECIAL ||
bd->pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL;
@@ -732,7 +732,7 @@
bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
Opening *pOpening;
- if(pLastIsoRun->limit>=bd->openingsSize) { /* no available new entry */
+ if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */
UBiDi *pBiDi=bd->pBiDi;
if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2))
return FALSE;
@@ -740,7 +740,7 @@
uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings,
SIMPLE_OPENINGS_SIZE * sizeof(Opening));
bd->openings=pBiDi->openingsMemory; /* may have changed */
- bd->openingsSize=pBiDi->openingsSize;
+ bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
}
pOpening=&bd->openings[pLastIsoRun->limit];
pOpening->position=position;
« no previous file with comments | « patches/bidi.patch ('k') | source/common/ubidiimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698