Save 28 bytes

This commit is contained in:
Armel FAUVEAU
2025-02-07 04:36:31 +01:00
parent 860c260c32
commit b915ef98c4

View File

@@ -1567,6 +1567,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
Offset = (Max >= 100) ? 3 : (Max >= 10) ? 2 : 1;
/*
switch (gInputBoxIndex)
{
case 1:
@@ -1579,6 +1580,11 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
Value = (gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2];
break;
}
*/
for (uint8_t i = 0; i < gInputBoxIndex; i++) {
Value = (Value * 10) + gInputBox[i];
}
if (Offset == gInputBoxIndex)
gInputBoxIndex = 0;