diff options
| author | James McCoy <jamessan@jamessan.com> | 2025-10-29 22:35:41 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-30 10:35:41 +0800 |
| commit | 35bac3c9741af54d121a8ef4e04ff20755943444 (patch) | |
| tree | 4322865a6ba0c944c77a568157cd962dc1aa7b6c /lua/cjson | |
| parent | cd944c13a94713a984c4593fc3639e49ae59b91d (diff) | |
| download | lua-cjson-master.tar.gz lua-cjson-master.tar.bz2 lua-cjson-master.zip | |
json_next_number_token stores the `long long` return value from `stroll`
in a `lua_Integer` (which is typically a typedef for `ptrdiff_t`).
On 32-bit platforms, this ends up storing an 8-byte number into a 4-byte
variable, truncating the value.
Instead, store the converted value in a temporary `long long` variable
so we can detect the scenario and decode into a `lua_Number`.
Signed-off-by: James McCoy <jamessan@jamessan.com>
Diffstat (limited to 'lua/cjson')
0 files changed, 0 insertions, 0 deletions
