From ae9fcedb09a67e408d3720aa0ab3ac1c28b94d30 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Wed, 5 Feb 2020 18:21:21 -0500
Subject: 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)
---
tools/schedule.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.
--
cgit