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

Fix encoding of long strings and bytes #20

Merged
merged 1 commit into from
Jul 27, 2018
Merged

Conversation

hayesgm
Copy link
Contributor

@hayesgm hayesgm commented Jul 27, 2018

The math for padding was incorrect. It would incorrectly calculating the padding for long strings and bytes causing an encoding issue. This patch fixes that issue by calculating the padding as: mod( 32 - mod(len, 32), 32). This math could probably be simplified, but I wanted to push out a quick fix.

The math for padding was incorrect. It would incorrectly calculating the padding for long strings and bytes causing an encoding issue. This patch fixes that issue by calculating the padding as: `mod( 32 - mod(len, 32), 32)`. This math could probably be simplified, but I wanted to push out a quick fix.
@hayesgm
Copy link
Contributor Author

hayesgm commented Jul 27, 2018

Fixes #19

@hayesgm hayesgm merged commit f3d1f24 into master Jul 27, 2018
@hayesgm hayesgm deleted the hayesgm/fix-long-strings branch July 27, 2018 04:13
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.

1 participant