mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.1611: Vim9: cannot pass "true" to nr2char()
Problem: Vim9: cannot pass "true" to nr2char(). Solution: use tv_get_bool_chk(). (closes #6878)
This commit is contained in:
@@ -5874,7 +5874,7 @@ f_nr2char(typval_T *argvars, typval_T *rettv)
|
||||
int utf8 = 0;
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
|
||||
utf8 = (int)tv_get_bool_chk(&argvars[1], NULL);
|
||||
if (utf8)
|
||||
buf[utf_char2bytes((int)tv_get_number(&argvars[0]), buf)] = NUL;
|
||||
else
|
||||
|
Reference in New Issue
Block a user