Skip to content

Commit

Permalink
Merge pull request #11 from DrewMartin/master
Browse files Browse the repository at this point in the history
Fix for an array bounds error in removeListeners
  • Loading branch information
jdarling committed Dec 14, 2012
2 parents f6617da + 00b968a commit 2f86979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MongoMQ.js
Expand Up @@ -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=='*');
Expand Down

0 comments on commit 2f86979

Please sign in to comment.