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

lua: Use lua_pushinteger for integer values in Lua 5.3+ #834

Closed
wants to merge 1 commit into from

Conversation

tomoe-mami
Copy link
Contributor

In Lua 5.3+, when displaying values from Weechat functions that return integer the output will have .0 appended. This is because lua_pushnumber since 5.3 only pushes float value and float to string conversion now keeps the fractional part.

To reproduce, build Weechat with Lua 5.3+ and load this simple script. It should print the current buffer number followed by .0.

This PR replaces lua_pushnumber with lua_pushinteger to fix this issue.

@flashcode flashcode closed this in f312e17 Nov 1, 2016
@flashcode
Copy link
Member

Thanks!

@flashcode flashcode added the bug Unexpected problem or unintended behavior label Nov 1, 2016
@flashcode flashcode added this to the 1.7 milestone Nov 1, 2016
@flashcode flashcode self-assigned this Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants