diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-10-25 22:35:08 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-10-25 22:42:23 +0200 |
commit | efcd4879781ee6c428b467052957534a7919d36d (patch) | |
tree | 69154c7631f0d9e16b597de7b48464d1a365db14 /applications/luci-app-transmission/root/usr | |
parent | 425bcfcb5285a1e1d3bea2680afbc21030dfd23e (diff) |
luci-lib-jsonc: improve handling of integral numeric values
Properly deal with integral numeric values exceeding the int32_t range
by replacing the cast logic with more fine grained checks:
- Lua numbers which are integers in the first place are directly converted
to JSON integers
- Finite double Lua numbers which are integral are converted to JSON
integer values
- All other numeric values are converted to JSON doubles
This should bring the handling of large integral value in line with the
documented behavior of turning non-fractional Lua numbers into JSON
integers.
Fixes: #6647
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-transmission/root/usr')
0 files changed, 0 insertions, 0 deletions