fix checkSelected
All checks were successful
/ Build & Publish (push) Successful in 52s

This commit is contained in:
Daniella 2024-06-25 07:21:49 +02:00
parent 5044570037
commit 7ec3cf005b
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -57,13 +57,13 @@ public class CBWindow extends JFrame implements WindowListener {
int max = 0; int max = 0;
while (list.get(selected).callback == null) { while (list.get(selected).callback == null) {
if(wasMovingUp) { if(wasMovingUp) {
if(selected-- == 0) { if(--selected < 0) {
selected++; selected++;
wasMovingUp = false; wasMovingUp = false;
} }
} }
else { else {
if(selected++ == list.size()) { if(--selected == list.size()) {
selected--; selected--;
wasMovingUp = true; wasMovingUp = true;
} }