bugfix (Thanks to John Sucaet)

This commit is contained in:
Olaf Bergmann committed 2012-04-18 12:29:41 +02:00
1 parent c98a084626
commit 7aa393ff65
1 file changed
+2 -2
+2 -2
View File
@@ -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) {