Permalink
Browse files

Merge pull request #11 from DrewMartin/master

Fix for an array bounds error in removeListeners
  • Loading branch information...
2 parents f6617da + 00b968a commit 2f869792f6af1f5896500fc5f5670bf3e5408f97 @jdarling committed Dec 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/MongoMQ.js
View
@@ -407,7 +407,7 @@ MongoMQ.prototype.removeListeners = function(event, handler){
}
if(!(event||handler)) return false;
var found = false, listener;
- for(var i = l; i>-1; i--){
+ for(var i = l-1; i>-1; i--){
found = false;
listener = self.listeners[i];
if(event) found = (event==listener.event)||(listener.event=='*');

0 comments on commit 2f86979

Please sign in to comment.