From 28d22fd39260688ba48e197749b50eb7aafbb4df Mon Sep 17 00:00:00 2001 From: Greg Edwards Date: Thu, 10 Jul 2014 22:35:35 -0400 Subject: [PATCH] Avoid crashing the DS if an unsupported GT request is sent. --- GlobalTerminalService/GTServer4.cs | 2 +- GlobalTerminalService/GTServer5.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GlobalTerminalService/GTServer4.cs b/GlobalTerminalService/GTServer4.cs index b0924bcd..42ea8633 100644 --- a/GlobalTerminalService/GTServer4.cs +++ b/GlobalTerminalService/GTServer4.cs @@ -58,7 +58,7 @@ namespace PkmnFoundations.GlobalTerminalService MemoryStream response = new MemoryStream(); response.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }, 0, 4); // placeholder for length response.WriteByte((byte)requestType); - response.WriteByte(Byte6(requestType)); + response.WriteByte(data[5]); try { diff --git a/GlobalTerminalService/GTServer5.cs b/GlobalTerminalService/GTServer5.cs index 33a5e02f..1dc7cf1a 100644 --- a/GlobalTerminalService/GTServer5.cs +++ b/GlobalTerminalService/GTServer5.cs @@ -57,7 +57,7 @@ namespace PkmnFoundations.GlobalTerminalService MemoryStream response = new MemoryStream(); response.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }, 0, 4); // placeholder for length response.WriteByte((byte)requestType); - response.WriteByte(Byte6(requestType)); + response.WriteByte(data[5]); try {