Skip to content

Commit

Permalink
added license file, culture invariant string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgmn committed Oct 5, 2016
1 parent f499a7c commit f95aa77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SynTex software is mostly under the MIT license. Check individual source files for license text. Provided image samples are not part of SynTex software.
4 changes: 2 additions & 2 deletions SynTex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void Main()
xdoc.Load("samples.xml");
int pass = 1;

for (var xnode = xdoc.FirstChild.FirstChild; xnode != null; xnode = xnode.NextSibling)
foreach (XmlNode xnode in xdoc.FirstChild.ChildNodes)
{
string name = xnode.Get("name", ""), method = xnode.Name;
int K = xnode.Get("K", 1), N = xnode.Get("N", 1), M = xnode.Get("M", 20), polish = xnode.Get("polish", 3), OW = xnode.Get("width", 32), OH = xnode.Get("height", 32);
Expand Down Expand Up @@ -404,7 +404,7 @@ static class Stuff
{
string s = ((XmlElement)node).GetAttribute(attribute);
var converter = TypeDescriptor.GetConverter(typeof(T));
return s == "" ? defaultT : (T)converter.ConvertFromString(s);
return s == "" ? defaultT : (T)converter.ConvertFromInvariantString(s);
}

public static int Random(this double[] array, double r)
Expand Down

0 comments on commit f95aa77

Please sign in to comment.