Skip to content

Commit

Permalink
Merge pull request guilhermelhr#3 from daniloleemes/bugfix/fix-model-…
Browse files Browse the repository at this point in the history
…loading

Fix ModelLoader issue - Double Parsing
  • Loading branch information
guilhermelhr authored Oct 11, 2020
2 parents 4d12ca1 + 047cf96 commit 2929097
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/Loaders/ModelLoader.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;

public class ModelLoader {
Expand Down Expand Up @@ -32,7 +33,7 @@ public static RSM Load(BinaryReader data) {
string version = Convert.ToString(data.ReadUByte());
string subversion = Convert.ToString(data.ReadUByte());
version += "." + subversion;
double dversion = double.Parse(version);
double dversion = double.Parse(version, CultureInfo.InvariantCulture);

rsm.version = version;
rsm.animLen = data.ReadLong();
Expand Down

0 comments on commit 2929097

Please sign in to comment.