From 04dd255be9ff1ddb47874ec87b00c6f7e1b6f0bf Mon Sep 17 00:00:00 2001 From: Christophe Macabiau Date: Tue, 1 Nov 2011 09:28:25 +0100 Subject: [PATCH] buffer.write bug fix --- lib/writer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }