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(lua): fix a bug that truncates the last lua argument. #652

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

romange
Copy link
Collaborator

@romange romange commented Jan 7, 2023

This happens when the last argument is a number because SNPrintF makes sure to write \0 even though we did not account of that when passing capacity. Since we allocate more than we use, the only thing we need to do is to pass larger capacity.

Signed-off-by: Roman Gershman [email protected]

@romange romange requested a review from dranikpg January 7, 2023 18:13
dranikpg
dranikpg previously approved these changes Jan 7, 2023
src/core/interpreter.cc Outdated Show resolved Hide resolved
This happens when the last argument is a number because SNPrintF makes sure
to write \0 even though we did not account of that when passing capacity.
Since we allocate more than we use, the only thing we need to do is
to pass larger capacity.

Signed-off-by: Roman Gershman <[email protected]>
@romange romange merged commit 2af9843 into main Jan 7, 2023
@romange romange deleted the FixLastNumTrunc branch January 7, 2023 19:45
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.

2 participants