--- Packets/IS_BTN.cs Mon Jun 07 15:57:22 2010 +++ Packets/IS_BTN.cs Fri Jun 11 08:02:22 2010 @@ -86,6 +86,11 @@ /// public byte[] Pack() { + if (Text.Length < 240) + { + Size = (byte) (12 + (Text.Length + (4 - (Text.Length % 4)))); + } + var writer = new PacketWriter(Size); writer.Write(Size); writer.Write((byte)Type); @@ -99,7 +104,7 @@ writer.Write(T); writer.Write(W); writer.Write(H); - writer.Write(Text, 240); + writer.Write(Text, Size - 12); return writer.GetData(); } }