mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
[unity][csharp] Fixed one more potential locale-based parsing exception. See #1354.
This commit is contained in:
parent
ae6e63de50
commit
26e3f928f7
@ -60,6 +60,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Spine.Unity.Editor {
|
||||
using EventType = UnityEngine.EventType;
|
||||
@ -1254,10 +1255,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