Skip to content

Commit

Permalink
Merge pull request #1 from Chukreev/patch-1
Browse files Browse the repository at this point in the history
Update PiaHeader.cs
  • Loading branch information
phusband committed Nov 7, 2014
2 parents f33c489 + 4e6b35e commit c06b69d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PiaHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//

using System;
using System.Globalization;

namespace PiaNO
{
Expand All @@ -24,7 +25,9 @@ public PiaHeader(string headerString)
if (headerArray.Length < 4)
throw new ArgumentOutOfRangeException();

PiaFileVersion = Double.Parse(headerArray[1]);
NumberFormatInfo wNFI = new NumberFormatInfo();
wNFI.CurrencyDecimalSeparator=".";
PiaFileVersion = Double.Parse(headerArray[1], wNFI);

var typeString = headerArray[2].Substring(0, 3);
PiaType = (PiaType)Enum.Parse(typeof(PiaType), typeString);
Expand Down

0 comments on commit c06b69d

Please sign in to comment.