| 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. */
|
|
|