Fix unnnecessary reference to DateTimeFormatInfo.DecimalSeparator (dotnet/coreclr...
authorStephen Toub <stoub@microsoft.com>
Fri, 20 Jul 2018 21:11:24 +0000 (17:11 -0400)
committerGitHub <noreply@github.com>
Fri, 20 Jul 2018 21:11:24 +0000 (17:11 -0400)
Commit migrated from https://github.com/dotnet/coreclr/commit/c98addeee64e0bca467079c7e9b9c359818f144c

src/libraries/System.Private.CoreLib/src/System/Globalization/TimeSpanFormat.cs

index 786ada3..5e553d5 100644 (file)
@@ -120,7 +120,7 @@ namespace System.Globalization
             Span<char> destination = maxLength < 128 ?
                 stackalloc char[maxLength] :
                 new char[maxLength]; // the chances of needing this case are almost 0, as DecimalSeparator.Length will basically always == 1
-            TryFormatStandard(value, format, dtfi.DecimalSeparator, destination, out int charsWritten);
+            TryFormatStandard(value, format, decimalSeparator, destination, out int charsWritten);
             return new string(destination.Slice(0, charsWritten));
         }