diff options
| author | James McCoy <jamessan@jamessan.com> | 2025-09-10 23:46:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-10 20:46:08 -0700 |
| commit | da650de277b0ce3e3901e847c489ef0e2b419d13 (patch) | |
| tree | f3e457887092460709d4e73568f0d3cf5178fc88 /runtime/syntax/python.vim | |
| parent | 5377cd34a963fa5dedb609d67a7ab17e2e8704ef (diff) | |
| download | rneovim-da650de277b0ce3e3901e847c489ef0e2b419d13.tar.gz rneovim-da650de277b0ce3e3901e847c489ef0e2b419d13.tar.bz2 rneovim-da650de277b0ce3e3901e847c489ef0e2b419d13.zip | |
fix(vim.json): fix truncation of decoded numbers outside lua_Integer's range #35702
PR #34876 expanded the total range of values that cjson considers
valid. However, it didn't address the bigger problem of storing a
`long long` value 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.
Store the converted value in a temporary `long long` variable so we can
detect the scenario and decode into a `lua_Number`.
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions