From 4ace1a9c51d4f8c223d8ac8756cd5c849d42c665 Mon Sep 17 00:00:00 2001 From: yasirkula Date: Sun, 18 Aug 2024 14:45:29 +0300 Subject: [PATCH] DebugLogConsole parses number inputs using InvariantCulture --- Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs b/Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs index 2d0980a..7e6d0ab 100644 --- a/Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs +++ b/Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs @@ -1130,7 +1130,7 @@ public static bool ParseChar( string input, out object output ) public static bool ParseFloat( string input, out object output ) { float value; - bool result = float.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + bool result = float.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), NumberStyles.Float, CultureInfo.InvariantCulture, out value ); output = value; return result; @@ -1139,7 +1139,7 @@ public static bool ParseFloat( string input, out object output ) public static bool ParseDouble( string input, out object output ) { double value; - bool result = double.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + bool result = double.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), NumberStyles.Float, CultureInfo.InvariantCulture, out value ); output = value; return result; @@ -1148,7 +1148,7 @@ public static bool ParseDouble( string input, out object output ) public static bool ParseDecimal( string input, out object output ) { decimal value; - bool result = decimal.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + bool result = decimal.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), NumberStyles.Float, CultureInfo.InvariantCulture, out value ); output = value; return result;