mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-29 18:07:08 +03:00
coap_debug.c: Fix coap_debug_set_packet_loss("100%")
This commit is contained in:
1 parent
b68a10be1b
commit
e985e09542
1 file changed
+1
-1
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user