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

FS#1914 - lua tonumber get wrong value #6825

Closed
openwrt-bot opened this issue Oct 29, 2018 · 2 comments
Closed

FS#1914 - lua tonumber get wrong value #6825

openwrt-bot opened this issue Oct 29, 2018 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

ptpt52:

on x86_64
build base openwrt current master HEAD

problem:

lua -e 'print("42949672961111"+1)'
1112
lua -e 'print("42949672951111"+1)'
42949672951112

lua tonumber get wrong.

problem not happens on arm/mips but only x86_64
x86_generic not tested

@Djfe
Copy link
Contributor

Djfe commented Feb 20, 2023

I think this is a duplicate of #5896 and can be closed @hauke

@hauke
Copy link
Member

hauke commented Feb 26, 2023

The problem was fixed. For me it works in a x86/64 image:

root@OpenWrt:/# lua -e 'print("42949672961111"+1)'
42949672961112
root@OpenWrt:/# lua -e 'print("42949672951111"+1)'
42949672951112
root@OpenWrt:/# lua -v
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)

I used this configuration:

CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_DEVICE_generic=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_lua5.3=y

It was probably fixed here: 4bb9af4

@hauke hauke closed this as completed Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants