From d72e03d221ce03ce6fc9e69640d7b07f9e8d0140 Mon Sep 17 00:00:00 2001 From: redfast00 <10746993+redfast00@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:08:16 +0200 Subject: [PATCH] Fix off-by-one in docs (#64) --- CONTRIBUTORS.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e7b2613..c38065b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,4 +5,5 @@ * [Michael Reed](https://github.com/mreed348) * [Oscar Reparaz](https://github.com/oreparaz) * [H. James Zhao](https://github.com/hantianjz) +* [redfast00](https://github.com/redfast00) diff --git a/README.md b/README.md index 3c354b8..af77374 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ char buf[64]; buf[0] = COBS_TINYFRAME_SENTINEL_VALUE; // You have to do this. buf[63] = COBS_TINYFRAME_SENTINEL_VALUE; // You have to do this. -// Now, fill buf[1 .. 63] with whatever data you want. +// Now, fill in buf[1] up to and including buf[62] (so 64 - 2 = 62 bytes of payload data) cobs_ret_t const result = cobs_encode_tinyframe(buf, 64);