Skip to content

Commit a694965

Browse files
committed
Removed unnecessary while loop
This change saves 56 bytes.
1 parent c541aff commit a694965

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ttyd-tools/rel/source/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace mod {
88

9-
const char *VersionNumber = "v3.0.21";
9+
const char *VersionNumber = "v3.0.22";
1010

1111
const char *RootLines[] =
1212
{

ttyd-tools/rel/source/menufunctions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,9 +3847,9 @@ void adjustMenuSelectionHorizontal(uint32_t button, uint8_t &currentMenuOption,
38473847
uint32_t TotalColumns = maxOptionsPerRow;
38483848

38493849
// Make sure the total columns is valid
3850-
while (TotalColumns > totalMenuOptions)
3850+
if (TotalColumns > totalMenuOptions)
38513851
{
3852-
TotalColumns--;
3852+
TotalColumns = totalMenuOptions;
38533853
}
38543854

38553855
switch (button)

0 commit comments

Comments
 (0)