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

Unified Diff: source/i18n/rbt_pars.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/rbt_data.cpp ('k') | source/i18n/regexcmp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/rbt_pars.cpp
diff --git a/source/i18n/rbt_pars.cpp b/source/i18n/rbt_pars.cpp
index 4cc0a6e4bf08f5cfb71c73e86090a9f70daa7399..fadc3d21b24aed01c8ad3447f8519a4cecb80bd5 100644
--- a/source/i18n/rbt_pars.cpp
+++ b/source/i18n/rbt_pars.cpp
@@ -1,6 +1,6 @@
/*
**********************************************************************
- * Copyright (C) 1999-2011, International Business Machines
+ * Copyright (C) 1999-2015, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
@@ -1102,11 +1102,11 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
for (int32_t j = 0; j < data->variablesLength; j++) {
data->variables[j] =
- ((UnicodeFunctor*)variablesVector.elementAt(j));
+ ((UnicodeSet*)variablesVector.elementAt(j));
}
data->variableNames.removeAll();
- int32_t pos = -1;
+ int32_t pos = UHASH_FIRST;
const UHashElement* he = variableNames.nextElement(pos);
while (he != NULL) {
UnicodeString* tempus = (UnicodeString*)(((UnicodeString*)(he->value.pointer))->clone());
@@ -1674,11 +1674,18 @@ utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorC
target--;
}
do {
+ if (source == sourceLimit) {
+ c = U_SENTINEL;
+ break;
+ }
c = *(source++);
}
while (c != CR && c != LF);
+ if (c < 0) {
+ break;
+ }
}
- else if (c == ESCAPE) {
+ else if (c == ESCAPE && source < sourceLimit) {
UChar32 c2 = *source;
if (c2 == CR || c2 == LF) {
/* A backslash at the end of a line. */
« no previous file with comments | « source/i18n/rbt_data.cpp ('k') | source/i18n/regexcmp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698