Fix zerocoder, use buffers instead of strings for vardata, add util for null-terminated string<->buffer conversion

This commit is contained in:
Casper Warden
2017-11-26 19:47:41 +00:00
parent 3f25aa0f1b
commit fc6d77a893
195 changed files with 2005 additions and 1881 deletions

View File

@@ -38,7 +38,7 @@ export class Packet
buf.writeUInt8(this.extraHeader.length, pos++);
if (this.extraHeader.length > 0)
{
this.extraHeader.copy(buf, pos, 0, this.extraHeader.length - 1);
this.extraHeader.copy(buf, pos);
pos += this.extraHeader.length;
}
const bodyStart = pos;