Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing // Now, fill buf[1 .. 63] with whatever data you want. in documentation #63

Closed
redfast00 opened this issue Oct 1, 2024 · 5 comments · Fixed by #64
Closed

Comments

@redfast00
Copy link
Contributor

In the README, under encoding tiny frames there is a comment // Now, fill buf[1 .. 63] with whatever data you want.

When I first read this, it wasn't entirely clear what was meant by this; by reading the code, I understand that this 1 .. 63 is inclusive of the beginning, but not of the end (so you can't fill in buf[63]). Maybe this could be made clearer:

// Now, fill in buf[1] up to and including buf[62] (so 64 - 2 = 62 bytes of payload data)

@charlesnicholson
Copy link
Owner

Ah, great catch, thanks! Your assessment is correct; it's an off-by-one bug in the docs and not anything deeper in the library :). Sorry about the confusion! I'll fix it asap, or if you want to open a PR against it I'll happily take it. (I think you can do that entirely from the UI for readme changes)

@redfast00
Copy link
Contributor Author

I'lll open a PR :)

@charlesnicholson
Copy link
Owner

Add your (user)name to the contributors list too if you like!

@redfast00
Copy link
Contributor Author

Thanks :) By the way, I like what you did with the new naming for tinyframe, it really makes it clear what it's intended for.

@charlesnicholson
Copy link
Owner

Thanks, it was in retrospect just truly awful naming that confused everyone. Sigh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants