From 53e42f0557bfe7305f6f04151d2a2c633d182e3a Mon Sep 17 00:00:00 2001 From: Vladimir Sigalkin Date: Fri, 14 Jun 2024 12:14:03 +0300 Subject: [PATCH] fix: conver invariant culture --- Assets/extApi/Runtime/ApiRouteTarget.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/extApi/Runtime/ApiRouteTarget.cs b/Assets/extApi/Runtime/ApiRouteTarget.cs index c3e7f5e..f78d22b 100644 --- a/Assets/extApi/Runtime/ApiRouteTarget.cs +++ b/Assets/extApi/Runtime/ApiRouteTarget.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Globalization; using System.IO; using System.Net; using System.Reflection; @@ -31,7 +32,7 @@ public ApiResult Invoke(HttpListenerContext context, Dictionary if (parameterInfo.GetCustomAttribute() == null) { args.Add(routeParameters.TryGetValue(parameterInfo.Name, out var value) - ? TypeDescriptor.GetConverter(parameterType).ConvertFromString(value) + ? TypeDescriptor.GetConverter(parameterType).ConvertFromString(null, CultureInfo.InvariantCulture, value) : ApiUtils.CreateDefault(parameterInfo.ParameterType)); } else