mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 12:07:21 +00:00
Fixed plugin values which depended on the region settings of the computer (#1194)
This commit is contained in:
1 parent
65d50de033
commit
a1b493cb13
20 files changed
+397
-137
No files matched your search
@@ -1,4 +1,6 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
using System.Globalization;
|
||||
|
||||
namespace AIStudio.Tools.PluginSystem;
|
||||
|
||||
/// <summary>
|
||||
@@ -46,9 +48,9 @@ public readonly record struct PluginVersion(int Major, int Minor, int Patch) : I
|
||||
if (segments.Length != 3)
|
||||
throw new FormatException("The input string must be in the format 'major.minor.patch'.");
|
||||
|
||||
var major = int.Parse(segments[0]);
|
||||
var minor = int.Parse(segments[1]);
|
||||
var patch = int.Parse(segments[2]);
|
||||
var major = int.Parse(segments[0], NumberStyles.Integer, CultureInfo.InvariantCulture);
|
||||
var minor = int.Parse(segments[1], NumberStyles.Integer, CultureInfo.InvariantCulture);
|
||||
var patch = int.Parse(segments[2], NumberStyles.Integer, CultureInfo.InvariantCulture);
|
||||
|
||||
if(major < 0 || minor < 0 || patch < 0)
|
||||
throw new FormatException("The major, minor, and patch numbers must be greater than or equal to 0.");
|
||||
|
||||
Reference in new issue
Block a user