From 1a3dfa8c8405fa56ea3de897c43d79650463e74c Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Fri, 5 May 2017 20:30:05 +0100 Subject: [PATCH] Return null from CultureData.GetLocaleInfoEx (#11422) --- src/mscorlib/src/System/Globalization/CalendarData.Windows.cs | 2 +- src/mscorlib/src/System/Globalization/CultureData.Windows.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mscorlib/src/System/Globalization/CalendarData.Windows.cs b/src/mscorlib/src/System/Globalization/CalendarData.Windows.cs index bf2c73d..89de24d 100644 --- a/src/mscorlib/src/System/Globalization/CalendarData.Windows.cs +++ b/src/mscorlib/src/System/Globalization/CalendarData.Windows.cs @@ -330,7 +330,7 @@ namespace System.Globalization string res = CultureData.GetLocaleInfoEx(localeName, lcType); // if it succeeded remember the override for the later callers - if (res != "") + if (res != null) { // Remember this was the override (so we can look for duplicates later in the enum function) context.userOverride = res; diff --git a/src/mscorlib/src/System/Globalization/CultureData.Windows.cs b/src/mscorlib/src/System/Globalization/CultureData.Windows.cs index 67d5201..c39327e 100644 --- a/src/mscorlib/src/System/Globalization/CultureData.Windows.cs +++ b/src/mscorlib/src/System/Globalization/CultureData.Windows.cs @@ -180,7 +180,7 @@ namespace System.Globalization return new String(pBuffer); } - return ""; + return null; } internal static unsafe int GetLocaleInfoExInt(String localeName, uint field) -- 2.7.4