Skip to content

Commit

Permalink
Add CultureInfo.InvariantCulture to int.Parse()
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/autowikibrowser/code/AWB@12173 5227b50d-9349-4574-b055-4b0a7525e11c
  • Loading branch information
reedy committed Nov 6, 2017
1 parent f56c98e commit d13654c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WikiFunctions/SiteInfo.cs
Expand Up @@ -25,6 +25,7 @@
using System.Net;
using Newtonsoft.Json.Linq;
using WikiFunctions.API;
using System.Globalization;

namespace WikiFunctions
{
Expand Down Expand Up @@ -197,7 +198,7 @@ public bool LoadSiteInfo()

foreach (XmlNode xn in query["namespaces"].GetElementsByTagName("ns"))
{
int id = int.Parse(xn.Attributes["id"].Value);
int id = int.Parse(xn.Attributes["id"].Value, CultureInfo.InvariantCulture);

if (id != 0) namespaces[id] = xn.InnerText + ":";
}
Expand All @@ -209,7 +210,7 @@ public bool LoadSiteInfo()

foreach (XmlNode xn in query["namespacealiases"].GetElementsByTagName("ns"))
{
int id = int.Parse(xn.Attributes["id"].Value);
int id = int.Parse(xn.Attributes["id"].Value, CultureInfo.InvariantCulture);

if (id != 0) namespaceAliases[id].Add(xn.InnerText);
}
Expand Down

0 comments on commit d13654c

Please sign in to comment.