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

js: fix topic and payload offsets for publish frames #2

Merged
merged 1 commit into from Dec 31, 2022

Conversation

jrobsonchase
Copy link
Contributor

There were a few things wrong here:

  • The search for the topic's null terminator was starting from the beginning of the payload, rather than after the sender's null terminator
  • The topic slice was also starting from the beginning of the payload
  • The i cursor was getting an extra +1, presumably to skip the null bytes for both the sender and the topic, even though the sender's byte was already being skipped a couple of lines down

Now, the sender null byte is skipped earlier for clarity and the search/slice for the topic starts in the right place.

@divi255 divi255 merged commit 1c5212d into alttch:main Dec 31, 2022
@divi255
Copy link
Member

divi255 commented Dec 31, 2022

thank you. merged. will be released next week after tests

@divi255
Copy link
Member

divi255 commented Jan 1, 2023

published in js client 0.1.2

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 this pull request may close these issues.

None yet

2 participants