-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comments
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) |
I'lll open a PR :) |
Add your (user)name to the contributors list too if you like! |
Thanks :) By the way, I like what you did with the new naming for |
Thanks, it was in retrospect just truly awful naming that confused everyone. Sigh. |
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 inbuf[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)
The text was updated successfully, but these errors were encountered: