Skip to content

Commit f95aa77

Browse files
committed
added license file, culture invariant string conversion
1 parent f499a7c commit f95aa77

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

SynTex.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static void Main()
2626
xdoc.Load("samples.xml");
2727
int pass = 1;
2828

29-
for (var xnode = xdoc.FirstChild.FirstChild; xnode != null; xnode = xnode.NextSibling)
29+
foreach (XmlNode xnode in xdoc.FirstChild.ChildNodes)
3030
{
3131
string name = xnode.Get("name", ""), method = xnode.Name;
3232
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);
@@ -404,7 +404,7 @@ static class Stuff
404404
{
405405
string s = ((XmlElement)node).GetAttribute(attribute);
406406
var converter = TypeDescriptor.GetConverter(typeof(T));
407-
return s == "" ? defaultT : (T)converter.ConvertFromString(s);
407+
return s == "" ? defaultT : (T)converter.ConvertFromInvariantString(s);
408408
}
409409

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

0 commit comments

Comments
 (0)