Restore the original check because % doesn't work.

This commit is contained in:
Dual Tachyon 2023-09-19 21:47:34 +01:00
parent d180585e52
commit 10b08d7c79

View File

@ -57,7 +57,11 @@ uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction)
uint8_t i;
for (i = 0; i < 20; i++) {
Channel %= 20;
if (Channel == 0xFF) {
Channel = 19;
} else if (Channel > 19) {
Channel = 0;
}
if (FM_CheckValidChannel(Channel)) {
return Channel;
}