mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-05 17:32:54 +03:00
bugfix (Thanks to John Sucaet)
This commit is contained in:
1 parent
c98a084626
commit
7aa393ff65
1 file changed
+2
-2
@@ -942,9 +942,9 @@ handle_request(coap_context_t *context, coap_queue_t *node) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* the resource was found, check if there is a registered handler */
|
||||
if (node->pdu->hdr->code < sizeof(resource->handler))
|
||||
if ((size_t)node->pdu->hdr->code <
|
||||
sizeof(resource->handler)/sizeof(coap_method_handler_t))
|
||||
h = resource->handler[node->pdu->hdr->code - 1];
|
||||
|
||||
if (h) {
|
||||
|
||||
Reference in new issue
Block a user