mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 8.2.3728: internal error when passing range() to list2blob()
Problem: Internal error when passing range() to list2blob(). Solution: Materialize the list first. (closes #9262)
This commit is contained in:
parent
c14b57c079
commit
04b7b4bf7f
@ -526,6 +526,7 @@ f_list2blob(typval_T *argvars, typval_T *rettv)
|
||||
if (l == NULL)
|
||||
return;
|
||||
|
||||
CHECK_LIST_MATERIALIZE(l);
|
||||
FOR_ALL_LIST_ITEMS(l, li)
|
||||
{
|
||||
int error;
|
||||
|
@ -675,7 +675,10 @@ func Test_list2blob()
|
||||
let b = range(16)->repeat(64)->list2blob()
|
||||
call assert_equal(1024, b->len())
|
||||
call assert_equal([4, 8, 15], [b[100], b[1000], b[1023]])
|
||||
|
||||
call assert_equal(0z, list2blob(test_null_list()))
|
||||
call assert_equal(0z00010203, list2blob(range(4)))
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@ -753,6 +753,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3728,
|
||||
/**/
|
||||
3727,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user