From 72908c10837c63f479c88f9f8cc1f608854004b2 Mon Sep 17 00:00:00 2001 From: Citrinate Date: Sat, 20 Apr 2024 17:46:16 -0400 Subject: [PATCH] Fix float parsing error --- CS2Interface/Data/Item.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CS2Interface/Data/Item.cs b/CS2Interface/Data/Item.cs index b4d74ac..92b276f 100644 --- a/CS2Interface/Data/Item.cs +++ b/CS2Interface/Data/Item.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using System.Linq; using System.Text.Json.Serialization; using SteamKit2; @@ -183,8 +184,8 @@ protected bool SetAdditionalProperties() { WearName = GameData.GetWearName(Wear.Value); string? wearRemapMinValue = ItemData.PaintKitDef!.GetValue("wear_remap_min"); string? wearRemapMaxValue = ItemData.PaintKitDef!.GetValue("wear_remap_max"); - WearMin = wearRemapMinValue == null ? null : float.Parse(wearRemapMinValue); - WearMax = wearRemapMaxValue == null ? null : float.Parse(wearRemapMaxValue); + WearMin = wearRemapMinValue == null ? null : float.Parse(wearRemapMinValue, NumberStyles.Float, CultureInfo.InvariantCulture); + WearMax = wearRemapMaxValue == null ? null : float.Parse(wearRemapMaxValue, NumberStyles.Float, CultureInfo.InvariantCulture); } // Set the weapon image url