Skip to content
Browse files

Minor change to bounds checking

  • Loading branch information...
1 parent dd99082 commit 29da61d28de62996bbf16cd5dd63a7561c4148c6 @mscdex committed Apr 16, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 buffy.js
  2. +1 −1 package.json
View
2 buffy.js
@@ -53,7 +53,7 @@ Buffy.prototype.indexOf = function(bytes, start) {
return ret;
};
Buffy.prototype.GCBefore = function(index) {
- if (index < 0 || index >= this._length)
+ if (index < 0 || index > this._length)
throw new Error('OOB');
var toRemove = 0, amount = 0;
for (var bn=0,i=0,len=this._store.length; bn<len; ++bn) {
View
2 package.json
@@ -1,5 +1,5 @@
{ "name": "buffy",
- "version": "0.0.1",
+ "version": "0.0.2",
"author": "Brian White <mscdex@mscdex.net>",
"description": "Manage and manipulate multiple node.js Buffers as if they were one continuous Buffer",
"main": "./buffy",

0 comments on commit 29da61d

Please sign in to comment.
Something went wrong with that request. Please try again.