mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-18 05:39:04 +03:00
coap_debug.c: Fix coap_debug_set_packet_loss("100%")
This commit is contained in:
1 parent
e774e2e7ee
commit
27f8e127ed
1 file changed
+1
-1
+1
-1
@@ -1384,7 +1384,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