Calling str.length returns the character count, not the actual byte count. Buffer.byteLength(str) returns the byte size (example: http://stackoverflow.com/a/9864762 ). If a command had unicode characters, the last few bytes would be truncated.
There may be other places where .byteLength(str) would be needed, but I haven't found any issues. And yes, I'm sending unicode via rcon :D
Calling
str.length
returns the character count, not the actual byte count.Buffer.byteLength(str)
returns the byte size (example: http://stackoverflow.com/a/9864762 ). If a command had unicode characters, the last few bytes would be truncated.There may be other places where
.byteLength(str)
would be needed, but I haven't found any issues. And yes, I'm sending unicode via rcon :D