Fix up bisect every which way

This commit is contained in:
2025-03-16 22:37:36 +01:00
parent 9192e68bd3
commit 70198ff293
2 changed files with 28 additions and 2 deletions

View File

@@ -26,7 +26,10 @@ class ModListTroubleshooter {
ModList binaryForward() {
final midIndex = (_startIndex + _endIndex) ~/ 2;
final subset = originalModList.activeMods.keys.toList().sublist(midIndex);
final subset = originalModList.activeMods.keys.toList().sublist(
midIndex,
_endIndex,
);
currentModList.disableAll();
currentModList.enableMods(subset);
_startIndex = midIndex;
@@ -36,7 +39,7 @@ class ModListTroubleshooter {
ModList binaryBackward() {
final midIndex = ((_startIndex + _endIndex) / 2).ceil();
final subset = originalModList.activeMods.keys.toList().sublist(
0,
_startIndex,
midIndex,
);
currentModList.disableAll();