PJK/libcbor

Stream Decoding printf typo

Peter98 opened this issue · 0 comments

Page: https://github.com/PJK/libcbor/blob/v0.5.0/doc/source/streaming/decoding.rst

Missing "." causes printf to print buffer to string termination character.

Code snippet:
printf("Found the value: %*s\n", (int) len, buffer);

Should be:
printf("Found the value: %.*s\n", (int) len, buffer);

Example code here is correct:
https://github.com/PJK/libcbor/blob/master/examples/streaming_parser.c