Skip to content

Commit

Permalink
fix readBytes method
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbosik authored Nov 1, 2017
1 parent 6072290 commit d887783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/packet/BinaryReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ BinaryReader.prototype.readDouble = function () {
};

BinaryReader.prototype.readBytes = function (length) {
return this._buffer.slice(this._offset, this._offset + length);
var value = this._buffer.slice(this._offset, this._offset + length);
this._offset += length;
return value;
};

BinaryReader.prototype.skipBytes = function (length) {
Expand Down

0 comments on commit d887783

Please sign in to comment.