diff --git a/resource.c b/resource.c index 2106db78..b29f9d0b 100644 --- a/resource.c +++ b/resource.c @@ -233,6 +233,7 @@ print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen, if (left < *buflen) { /* this is not the first resource */ *p++ = ','; --left; + ++written; } if (!coap_print_link(r, p, &left))