MIC-E improvements

This commit is contained in:
wb2osz 2024-10-22 23:38:38 +01:00
parent aede01d6ac
commit 44f576cb73
2 changed files with 3 additions and 3 deletions

View File

@ -1424,7 +1424,7 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int
if (ilen < sizeof(struct aprs_mic_e_s)) {
if ( ! A->g_quiet) {
text_color_set(DW_COLOR_ERROR);
dw_printf("MIC-E format must have at least %d characters in the information part.\n", sizeof(struct aprs_mic_e_s));
dw_printf("MIC-E format must have at least %d characters in the information part.\n", (int)(sizeof(struct aprs_mic_e_s)));
}
return;
}

View File

@ -620,7 +620,7 @@ static inline int strncmp_z (char *a, char *b, size_t len)
void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, char *device, size_t device_size)
{
strlcpy (device, "UNKNOWN vendor/model", device_size);
strlcpy (trimmed, comment, sizeof(trimmed));
strlcpy (trimmed, comment, trimmed_size);
if (strlen(comment) < 1) {
return;
}
@ -675,7 +675,7 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch
// Not found.
strlcpy (device, "UNKNOWN vendor/model", device_size);
strlcpy (trimmed, comment, sizeof(trimmed));
strlcpy (trimmed, comment, trimmed_size);
} // end deviceid_decode_mice