coap_debug.c: Fix coap_debug_set_packet_loss("100%")

This commit is contained in:
Jon Shallow committed 2026-03-16 16:52:24 +00:00
1 parent b68a10be1b
commit e985e09542
1 file changed
+1 -1
+1 -1
View File
@@ -1327,7 +1327,7 @@ coap_debug_set_packet_loss(const char *loss_level) {
if (*end == '%') {
if (n > 100)
n = 100;
packet_loss_level = n * 65536 / 100;
packet_loss_level = n * 0xffff / 100;
coap_log_debug("packet loss level set to %d%%\n", n);
} else {
if (n <= 0)