Fixed an array bounds issue with string decoder when length isn't provided.

This commit is contained in:
Greg Edwards
2014-06-07 20:18:08 -04:00
parent 6d98210d97
commit ba4bd98702
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ namespace PkmnFoundations.Support
public static String DecodeString(byte[] data)
{
return DecodeString(data, 0, data.Length);
return DecodeString(data, 0, data.Length >> 1);
}
public static byte[] EncodeString(string str)

View File

@@ -48,7 +48,7 @@ namespace PkmnFoundations.Support
public static String DecodeString(byte[] data)
{
return DecodeString(data, 0, data.Length);
return DecodeString(data, 0, data.Length >> 1);
}
public static byte[] EncodeString(string str)