Browse Source

smarter

patch-2
Ryan X. Charles 10 years ago
parent
commit
8e049b7244
  1. 7
      lib/bufferreader.js

7
lib/bufferreader.js

@ -27,14 +27,11 @@ BufferReader.prototype.buffer = function(len) {
};
BufferReader.prototype.read = function(len) {
if (len) {
if (!len)
var len = this.buf.length;
var buf = this.buf.slice(this.pos, this.pos + len);
this.pos = this.pos + len;
return buf;
}
var buf = this.buf.slice(this.pos);
this.pos = this.buf.length;
return buf;
};
BufferReader.prototype.readUInt8 = function() {

Loading…
Cancel
Save