Skip to content

Commit 7348f98

Browse files
committed
fix parsing error in version number (comma vs dot), #GITBUILD
1 parent d420ba7 commit 7348f98

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

UnityLauncherPro/Tools.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.ComponentModel;
55
using System.Diagnostics;
6+
using System.Globalization;
67
using System.IO;
78
using System.Linq;
89
using System.Net;
@@ -970,7 +971,7 @@ public static string CleanVersionNumber(string version)
970971
if (string.IsNullOrEmpty(version)) return null;
971972

972973
var split = version.Split('.');
973-
float parsedVersion = float.Parse($"{split[0]}.{split[1]}");
974+
float parsedVersion = float.Parse($"{split[0]}.{split[1]}", CultureInfo.InvariantCulture);
974975

975976
// For 2023.3 and newer pre-release (alpha or beta) versions, do not clean.
976977
if ((IsAlpha(version) || version.Contains("b")) && parsedVersion >= 2023.3)

0 commit comments

Comments
 (0)