From f6b7511c464b8b82ceb8cebcd8c39e74660c0e21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felipe=20Balbont=C3=ADn?= Date: Fri, 8 Jul 2016 22:19:26 +0000 Subject: [PATCH] ICU-12614 DateFormatSymbols resource bundle data loading updated to use the ResourceSink: fixed broken build. X-SVN-Rev: 38962 --- icu4c/source/i18n/dtfmtsym.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icu4c/source/i18n/dtfmtsym.cpp b/icu4c/source/i18n/dtfmtsym.cpp index d774a130b37..2e5ea99797b 100644 --- a/icu4c/source/i18n/dtfmtsym.cpp +++ b/icu4c/source/i18n/dtfmtsym.cpp @@ -2107,10 +2107,10 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // Iterate over the resource bundle data following the fallbacks through different calendar types UnicodeString calendarType((type != NULL && *type != '\0')? type : gGregorianTag, -1, US_INV); while (!calendarType.isBogus()) { - int32_t calendarTypeSize = calendarType.length(); - char calendarTypeCArray[calendarTypeSize + 1]; - calendarType.extract(0, calendarTypeSize, calendarTypeCArray, calendarTypeSize, US_INV); - calendarTypeCArray[calendarTypeSize] = '\0'; + CharString calendarTypeBuffer; + calendarTypeBuffer.appendInvariantChars(calendarType, status); + if (U_FAILURE(status)) { return; } + const char *calendarTypeCArray = calendarTypeBuffer.data(); // Enumerate this calendar type. If the calendar is not found fallback to gregorian UErrorCode oldStatus = status; -- 2.40.0