diff options
Diffstat (limited to 'Build/source/libs/icu-xetex/i18n/tridpars.cpp')
-rw-r--r-- | Build/source/libs/icu-xetex/i18n/tridpars.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Build/source/libs/icu-xetex/i18n/tridpars.cpp b/Build/source/libs/icu-xetex/i18n/tridpars.cpp index 668005ca7e0..f0338de254f 100644 --- a/Build/source/libs/icu-xetex/i18n/tridpars.cpp +++ b/Build/source/libs/icu-xetex/i18n/tridpars.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2005, International Business Machines Corporation +* Copyright (c) 2002-2006, International Business Machines Corporation * and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -33,7 +33,7 @@ static const UChar VARIANT_SEP = 0x002F; // / static const UChar OPEN_REV = 0x0028; // ( static const UChar CLOSE_REV = 0x0029; // ) -static const UChar EMPTY[] = {0}; // "" +//static const UChar EMPTY[] = {0}; // "" static const UChar ANY[] = {65,110,121,0}; // "Any" static const UChar ANY_NULL[] = {65,110,121,45,78,117,108,108,0}; // "Any-Null" @@ -581,6 +581,10 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source, if (variant.length() != 0) { id.append(VARIANT_SEP).append(variant); } + // NUL-terminate the ID string for getTerminatedBuffer. + // This prevents valgrind and Purify warnings. + id.append((UChar)0); + id.truncate(id.length()-1); } /** @@ -878,7 +882,7 @@ void TransliteratorIDParser::init(UErrorCode &status) { special_inverses = NULL; } umtx_unlock(&LOCK); - delete special_inverses; + delete special_inverses; /*null instance*/ ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, transliterator_cleanup); } |