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

Side by Side Diff: patches/col.patch

Issue 822213003: ICU upgrade to 54.1 step 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: readme: better wrapping, declspec patch dropped Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « patches/clang_win.patch ('k') | patches/configure.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Index: source/i18n/ucol.cpp
2 ===================================================================
3 --- source/i18n/ucol.cpp (revision 292709)
4 +++ source/i18n/ucol.cpp (working copy)
5 @@ -2259,6 +2259,9 @@ inline UChar getNextNormalizedChar(collIterate *data)
6 if (data->pos + 1 == data->endp) {
7 return *(data->pos ++);
8 }
9 + if (data->pos >= data->endp) {
10 + return (UChar) -1; // return U+FFFF (non-char) to indicate an error
11 + }
12 }
13 else {
14 if (innormbuf) {
15 @@ -2820,8 +2823,14 @@ uint32_t ucol_prv_getSpecialCE(const UCollator *coll, UCh ar ch, uint32_t CE, col
16 goBackOne(source);
17 }
18 }
19 - } else if (U16_IS_LEAD(schar)) {
20 - miss = U16_GET_SUPPLEMENTARY(schar, getNextNormaliz edChar(source));
21 + } else if (U16_IS_LEAD(schar) && source->pos + 1 < sour ce->endp) {
22 + const UChar* prevPos = source->pos;
23 + UChar nextChar = getNextNormalizedChar(source);
24 + if (U16_IS_TRAIL(nextChar)) {
25 + miss = U16_GET_SUPPLEMENTARY(schar, nextChar);
26 + } else if (prevPos < source->pos) {
27 + goBackOne(source);
28 + }
29 }
30
31 uint8_t sCC;
OLDNEW
« no previous file with comments | « patches/clang_win.patch ('k') | patches/configure.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698