aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-02-05 18:21:21 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-02-05 18:21:25 -0500
commitae9fcedb09a67e408d3720aa0ab3ac1c28b94d30 (patch)
treeaad0174c3312c387d462b2f5d35f9c565a642fb7 /tools
parent31363c7baad1a065f552bad93e7be6a32200cf75 (diff)
fixed a BIG bug
So, this is pretty embarrassing, but I didn't realize that I was pushing the entire stack whenever 0 chars were supposed to be pushed because I thought that javascript's built-in functions were ok with negative zeros (stupid me)
Diffstat (limited to 'tools')
-rw-r--r--tools/schedule.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/schedule.js b/tools/schedule.js
index 6173e94..caad554 100644
--- a/tools/schedule.js
+++ b/tools/schedule.js
@@ -98,7 +98,7 @@ exports.Queue = function(delayms, maxExport, call){
let data = job.data;
let topop = job.wacc-job.wacc%1;
job.wacc -= topop
- dequeued.push(...data.splice(-topop));
+ dequeued.push(...data.splice(data.length-topop));
}
// Step 4: Shallow copy job array, and sort by job.wacc.