Merge pull request #318 from igrr/bugfix/format_truncation_warning

coap_debug.c: fix format warning when compiling with GCC 8
This commit is contained in:
obgm authored and GitHub committed 2019-03-31 15:28:22 +02:00
commit 0158bc46fa
1 file changed
+1 -1
+1 -1
View File
@@ -291,7 +291,7 @@ msg_code_string(uint16_t c) {
} else if (c >= 224 && c - 224 < (int)(sizeof(signals)/sizeof(const char *))) {
return signals[c-224];
} else {
snprintf(buf, sizeof(buf), "%u.%02u", c >> 5, c & 0x1f);
snprintf(buf, sizeof(buf), "%u.%02u", (c >> 5) & 0x7, c & 0x1f);
return buf;
}
}