Skip to content

Commit

Permalink
Fixed '\0' characters appearing in strings read with explicit length
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Feb 22, 2015
1 parent 46df8c5 commit bcb52d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WowPacketParser/Misc/PacketReads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public Quaternion ReadPackedQuaternion()
public string ReadWoWString(int len)
{
Encoding encoding = Encoding.UTF8;
var bytes = ReadBytes(len);
var bytes = ReadBytes(len).Where(b => b != 0).ToArray();
string s = encoding.GetString(bytes);
return s;
}
Expand Down

0 comments on commit bcb52d5

Please sign in to comment.