Skip to content

Code Review I #1

Open
Dlex925 wants to merge 2 commits intoalexremus26:sfml3from
Dlex925:sfml3
Open

Code Review I #1
Dlex925 wants to merge 2 commits intoalexremus26:sfml3from
Dlex925:sfml3

Conversation

@Dlex925
Copy link
Copy Markdown

@Dlex925 Dlex925 commented Oct 31, 2025

Code Review I: Removed unnecessary running variable and fixed out-of-bounds item selection

Changes

  • Removed the running variable, it was redundant and replaceable with window.close() - optimizing the while loop at line 395.

Bug

  • When cycling through the “Currently selected item,” you can go up to 9, regardless of how many items actually exist.

Fix

  • Updated line 414 to select the highest existing item index when the user tries to select out of bounds.
  • Adjusted the displayed text to say "Use [1-biggest_existing_index]"

Removed the running variable as it can entirely be replaced with window.close() optimizing the while loop at line 395.

Bug: 
 You can go up to number 9 on the "Currently selected item" no matter the number of existing items.
 
 Solution:  
    Changed line 414 to select the biggest index with an existing item when choosing an out of bounds item, also fixed the displayed text to say "Use [1-biggest_existing_index]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant