Hi.

Since 7.4.1989, filter()/map() cause SEGV when 2nd argument is number.

[repro steps]

vim -Nu NONE

:call filter([0], 0)

[cause]

https://github.com/vim/vim/blob/245a7cb/src/eval.c#L12054
https://github.com/vim/vim/blob/245a7cb/src/eval.c#L12073

It needs type-checking (or value-convertion) before calling 'skipwhite()'.

[patch]

Calling 'get_tv_string_buf_chk()' to convert the value of 'expr' to string.

https://gist.github.com/ichizok/edca7401330a988501993e170d1388e8


Thank you.
- Ozaki Kiichi

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui