Skip to content

Commit 28ff581

Browse files
committed
Fixed parsing from string to double.
Now it's culture invariant, so it'll parse correctly no matter what the language is.
1 parent 339eb8b commit 28ff581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Luaon.NET/LuaTableTextReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ private object ReadNumberLiteral()
759759
}
760760
else
761761
{
762-
return Convert.ToDouble(expr) * signFactor;
762+
return double.Parse(expr, System.Globalization.CultureInfo.InvariantCulture) * signFactor;
763763
}
764764
}
765765
else if (signFactor == -1) // We have already consumed "-"

0 commit comments

Comments
 (0)