(no message)
diff --git a/PokemonGo.RocketAPI/Client.cs b/PokemonGo.RocketAPI/Client.cs
index 83d1b2c..e377ca9 100644
--- a/PokemonGo.RocketAPI/Client.cs
+++ b/PokemonGo.RocketAPI/Client.cs
@@ -46,12 +46,12 @@ namespace PokemonGo.RocketAPI
{
var latlngFromFile = File.ReadAllText(path + filename);
var latlng = latlngFromFile.Split(':');
- if (latlng[0].Length != 0 && latlng[1].Length != 0 && latlng[0] != "NaN" && latlng[1] != "NaN")
+ double latitude, longitude;
+ if ((latlng[0].Length > 0 && double.TryParse(latlng[0], out latitude) && latitude >= -90.0 && latitude <= 90.0) && (latlng[1].Length > 0 && double.TryParse(latlng[1], out longitude) && longitude >= -180.0 && longitude <= 180.0))
{
try
{
- SetCoordinates(Convert.ToDouble(latlng[0]), Convert.ToDouble(latlng[1]),
- Settings.DefaultAltitude);
+ SetCoordinates(latitude, longitude, Settings.DefaultAltitude);
}
catch (FormatException)
{
@@ -66,6 +66,7 @@ namespace PokemonGo.RocketAPI
}
else
{
+ Logger.Normal("Missing \"Configs\\Coords.txt\", using default settings for coordinates.");
SetCoordinates(Settings.DefaultLatitude, Settings.DefaultLongitude, Settings.DefaultAltitude);
}
diff --git a/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj b/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
index a61f670..65ff04d 100644
--- a/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
+++ b/PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
@@ -17,7 +17,7 @@
<UpdateAssemblyInfoVersion>False</UpdateAssemblyInfoVersion>
<AssemblyVersionSettings>YearStamp.MonthStamp.DayStamp.Increment</AssemblyVersionSettings>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
- <AssemblyVersion>2016.7.23.131</AssemblyVersion>
+ <AssemblyVersion>2016.7.23.133</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
diff --git a/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs b/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
index 2423822..0478559 100644
--- a/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
+++ b/PokemonGo.RocketAPI/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2016.7.23.132")]
+[assembly: AssemblyVersion("2016.7.23.133")]
[assembly: AssemblyFileVersion("1.0.0.0")]
You may download the files in Public Git.