ICU-12665 Fixing out-of-scope temporary in ucurr.cpp

X-SVN-Rev: 39037
This commit is contained in:
Shane Carr 2016-08-11 01:19:30 +00:00
parent 9f86c49c46
commit 44a2f0d09b

View File

@ -1025,7 +1025,8 @@ collectCurrencyNames(const char* locale,
(*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = len;
// Add equivalent symbols
if (currencySymbolsEquiv != NULL) {
icu::EquivIterator iter(*currencySymbolsEquiv, UnicodeString(TRUE, s, len));
UnicodeString str(TRUE, s, len);
icu::EquivIterator iter(*currencySymbolsEquiv, str);
const UnicodeString *symbol;
while ((symbol = iter.next()) != NULL) {
(*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;