Skip to content

Commit

Permalink
fix it better (was showing plot)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacky720 authored Nov 14, 2023
1 parent 8c81721 commit 12734e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,17 @@ function updateSaveDataForm(values) {
updateSelection(id, values[flagOffset + flagFor[id]]);
}

// "<=" so 512's options load
for (let i = 0; i <= flagCount; i++) {
for (let i = 0; i < flagCount; i++) {
updateSelection("sav-flag-" + i, values[flagOffset + i], flags[i][2]);
// Update checkboxes (should have no ill effects on non-checkbox-based flags)
if (document.getElementById("sav-flag-" + i).nodeName === "INPUT") {
document.getElementById("sav-flag-" + i).previousSibling.checked = Number(values[flagOffset + i]);
}
}

// load flag 512 values, even if just for loading
updateSelection("sav-flag-512", 0, flags[512][2]);

// I would do currentValue++ each loop but this is probably better
currentValue += flagCount;
break;
Expand Down

0 comments on commit 12734e6

Please sign in to comment.