Added a CodeQL workflow to check for bugs through code analysis. Fixed numerous bugs and implemented safeguards as already reported.

This commit is contained in:
n1474335 2021-02-10 13:13:19 +00:00
parent 892a3716ed
commit 1abc46058c
32 changed files with 87 additions and 61 deletions

View file

@ -510,10 +510,6 @@ class InputWaiter {
if (inputNum !== activeTab) return;
const fileLoaded = document.getElementById("input-file-loaded");
let oldProgress = fileLoaded.textContent;
if (oldProgress !== "Error") {
oldProgress = parseInt(oldProgress.replace("%", ""), 10);
}
if (progress === "error") {
fileLoaded.textContent = "Error";
fileLoaded.style.color = "#FF0000";
@ -1276,7 +1272,7 @@ class InputWaiter {
const func = function(time) {
if (this.mousedown) {
this.changeTabRight();
const newTime = (time > 50) ? time = time - 10 : 50;
const newTime = (time > 50) ? time - 10 : 50;
setTimeout(func.bind(this, [newTime]), newTime);
}
};
@ -1293,7 +1289,7 @@ class InputWaiter {
const func = function(time) {
if (this.mousedown) {
this.changeTabLeft();
const newTime = (time > 50) ? time = time - 10 : 50;
const newTime = (time > 50) ? time - 10 : 50;
setTimeout(func.bind(this, [newTime]), newTime);
}
};