diff --git a/lib/writer.js b/lib/writer.js index 27b4bc8e0..cfa87d57a 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -43,7 +43,7 @@ p.addCString = function(string) { } else { var len = Buffer.byteLength(string); this._ensure(len + 1); //+1 for null terminator - this.buffer.write(string, this.offset, len); + this.buffer.write(string, this.offset); this.offset += len; } @@ -53,7 +53,7 @@ p.addCString = function(string) { p.addChar = function(char) { this._ensure(1); - this.buffer.write(char, this.offset, 1); + this.buffer.write(char, this.offset); this.offset++; return this; }