mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity][csharp] Fixed one more potential locale-based parsing exception. See #1354.
This commit is contained in:
parent
a8c0abc0c8
commit
e8eb894304
@ -57,6 +57,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Spine.Unity.Editor {
|
||||
using EventType = UnityEngine.EventType;
|
||||
@ -1184,10 +1185,10 @@ namespace Spine.Unity.Editor {
|
||||
string[] versionSplit = rawVersion.Split('.');
|
||||
bool match = false;
|
||||
foreach (var version in compatibleVersions) {
|
||||
bool primaryMatch = version[0] == int.Parse(versionSplit[0]);
|
||||
bool secondaryMatch = version[1] == int.Parse(versionSplit[1]);
|
||||
bool primaryMatch = version[0] == int.Parse(versionSplit[0], CultureInfo.InvariantCulture);
|
||||
bool secondaryMatch = version[1] == int.Parse(versionSplit[1], CultureInfo.InvariantCulture);
|
||||
|
||||
// if (isFixVersionRequired) secondaryMatch &= version[2] <= int.Parse(jsonVersionSplit[2]);
|
||||
// if (isFixVersionRequired) secondaryMatch &= version[2] <= int.Parse(jsonVersionSplit[2], CultureInfo.InvariantCulture);
|
||||
|
||||
if (primaryMatch && secondaryMatch) {
|
||||
match = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user