Added some missing try blocks to gamestats request decoder.

This commit is contained in:
Greg Edwards
2014-05-27 23:43:08 -04:00
parent 8e7495f007
commit c90b3ac1de

View File

@@ -50,7 +50,7 @@ namespace PkmnFoundations.GTS.debug
{
}
if (data == null)
if (data == null) try
{
data = DecryptData(txtData.Text);
@@ -58,10 +58,25 @@ namespace PkmnFoundations.GTS.debug
foreach (byte b in data)
checkedsum += b;
litGeneration.Text = "";
litGeneration.Text = "Platinum?";
litChecksum.Text = checkedsum.ToString();
phChecksum.Visible = true;
}
catch (FormatException)
{
}
if (data == null) try
{
data = GtsSessionBase.FromUrlSafeBase64String(txtData.Text);
litGeneration.Text = "Unknown (are you sure this is gamestats data?)";
litChecksum.Text = "";
phChecksum.Visible = false;
}
catch (FormatException)
{
}
if (data == null)
{