mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
charset: Avoid overflow in vim_str2nr
This commit is contained in:
@@ -6867,13 +6867,19 @@ describe('Expressions parser', function()
|
||||
},
|
||||
}, {
|
||||
})
|
||||
check_parsing('0', 0, {
|
||||
-- 0
|
||||
check_parsing({data='01', size=1}, 0, {
|
||||
ast = {
|
||||
'Integer(val=0):0:0:0',
|
||||
},
|
||||
}, {
|
||||
hl('Number', '0'),
|
||||
})
|
||||
check_parsing({data='001', size=2}, 0, {
|
||||
ast = {
|
||||
'Integer(val=0):0:0:00',
|
||||
},
|
||||
}, {
|
||||
hl('Number', '00'),
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user