Better error message for unprintable data type indicator.

This commit is contained in:
wb2osz 2019-11-08 20:36:10 -05:00
parent a7a84269fc
commit d9d6bb4257
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,12 @@ void decode_aprs (decode_aprs_t *A, packet_t pp, int quiet)
A->g_quiet = quiet;
snprintf (A->g_msg_type, sizeof(A->g_msg_type), "Unknown APRS Data Type Indicator \"%c\"", *pinfo);
if (isprint(*pinfo)) {
snprintf (A->g_msg_type, sizeof(A->g_msg_type), "Unknown APRS Data Type Indicator \"%c\"", *pinfo);
}
else {
snprintf (A->g_msg_type, sizeof(A->g_msg_type), "ERROR!!! Unknown APRS Data Type Indicator: unprintable 0x%02x", *pinfo);
}
A->g_symbol_table = '/'; /* Default to primary table. */
A->g_symbol_code = ' '; /* What should we have for default symbol? */