Skip to content

Commit

Permalink
fix: conver invariant culture
Browse files Browse the repository at this point in the history
  • Loading branch information
Iam1337 committed Jun 14, 2024
1 parent 7636143 commit 53e42f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/extApi/Runtime/ApiRouteTarget.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -31,7 +32,7 @@ public ApiResult Invoke(HttpListenerContext context, Dictionary<string, string>
if (parameterInfo.GetCustomAttribute<ApiBodyAttribute>() == 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
Expand Down

0 comments on commit 53e42f0

Please sign in to comment.