From efc2fd5bd20ed6262fbc4125ce7915c668d5d483 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 11 Jan 2014 15:05:37 -0700 Subject: [PATCH] Safer --- builds/4chan-X.user.js | 4 ++-- builds/crx/script.js | 4 ++-- src/General/Main.coffee | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9a51ffe7f..816c5df08 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -13108,11 +13108,11 @@ cbs = klass.callbacks; fn = function() { var node; - if (!(node = nodes[i++])) { + if (!(node = nodes[i])) { return false; } cbs.execute(node); - return i % 25; + return ++i % 25; }; softTask = function() { while (fn()) { diff --git a/builds/crx/script.js b/builds/crx/script.js index f29b864e3..969abfc4c 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -13085,11 +13085,11 @@ cbs = klass.callbacks; fn = function() { var node; - if (!(node = nodes[i++])) { + if (!(node = nodes[i])) { return false; } cbs.execute(node); - return i % 25; + return ++i % 25; }; softTask = function() { while (fn()) { diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 5f55eb995..e3da85164 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -182,9 +182,9 @@ Main = cbs = klass.callbacks fn = -> - return false unless node = nodes[i++] + return false unless node = nodes[i] cbs.execute node - i % 25 + ++i % 25 softTask = -> while fn()