Skip to content

Commit

Permalink
Fix off-by-one in docs (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
redfast00 authored Oct 1, 2024
1 parent 350abc1 commit d72e03d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d72e03d

Please sign in to comment.