We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b5b107 commit b183800Copy full SHA for b183800
fCraft/Network/PacketReader.cs
@@ -42,8 +42,8 @@ public override string ReadString() {
42
byte[] data = ReadBytes( Packet.StringSize );
43
for( int i = Packet.StringSize - 1; i >= 0; i-- ) {
44
byte code = data[i];
45
- if( length == 0 && !(code == 0 || code == 0x20) )
46
- length = i + 1;
+ if (code == 0) code = 0x20; // NULL to space
+ if (length == 0 && code != 0x20) { length = i + 1; }
47
48
// Treat code as an index in code page 437
49
if( code < 0x20 ) {
0 commit comments