]> granicus.if.org Git - icu/commitdiff
ICU-13217 - UWP version ends up falling back to the 'en_US' locale. (Missing lines...
authorJeff Genovy <29107334+jefgen@users.noreply.github.com>
Wed, 31 May 2017 17:17:54 +0000 (17:17 +0000)
committerJeff Genovy <29107334+jefgen@users.noreply.github.com>
Wed, 31 May 2017 17:17:54 +0000 (17:17 +0000)
X-SVN-Rev: 40146

icu4c/source/common/putil.cpp

index 14922a7a9dba7cf682ff6658d9e216e4353c22da..511ffb81ab683b5397126fc1390ba49833faebfa 100644 (file)
@@ -1809,6 +1809,8 @@ The leftmost codepage (.xxx) wins.
         }
 
         // Now normalize the resulting name
+        correctedPOSIXLocale = static_cast<char *>(uprv_malloc(POSIX_LOCALE_CAPACITY + 1));
+        /* TODO: Should we just exit on memory allocation failure? */
         if (correctedPOSIXLocale)
         {
             int32_t posixLen = uloc_canonicalize(modifiedWindowsLocale, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status);