Skip to content

Conversation

LaborEtArs
Copy link
Contributor

The code
size_t size = ((length * 1.6f) + 1);
gives wrong values for small input lengths.
Use cencode.h defined macros to calculate the needed buffer size instead.

Copy link
Collaborator

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. I can't believe we have a floating point multiply in the code just to (incorrectly) get the appropriate length!

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

Successfully merging this pull request may close these issues.

3 participants