[Morse] Fix possible overflow

This commit is contained in:
jgromes 2025-01-17 19:59:25 +01:00
parent 10c38164f2
commit c538cac769
2 changed files with 2 additions and 1 deletions

View file

@ -56,7 +56,7 @@ char MorseClient::decode(uint8_t symbol, uint8_t len) {
}
// nothing found
return(RADIOLIB_MORSE_UNSUPPORTED);
return(RADIOLIB_MORSE_UNKNOWN_SYMBOL);
}
#if !RADIOLIB_EXCLUDE_AFSK

View file

@ -14,6 +14,7 @@
#define RADIOLIB_MORSE_INTER_SYMBOL 0x00
#define RADIOLIB_MORSE_CHAR_COMPLETE 0x01
#define RADIOLIB_MORSE_WORD_COMPLETE 0x02
#define RADIOLIB_MORSE_UNKNOWN_SYMBOL '*'
// Morse character table: - using codes defined in ITU-R M.1677-1
// - Morse code representation is saved LSb first, using additional bit as guard