Skip to content

Commit

Permalink
Fix float parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Apr 20, 2024
1 parent 330f871 commit 72908c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CS2Interface/Data/Item.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.Linq;
using System.Text.Json.Serialization;
using SteamKit2;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 72908c1

Please sign in to comment.