summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/blob.c1
-rw-r--r--src/testdir/test_blob.vim3
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index 04319f8b1e..2833c1a8c6 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -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;
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim
index 473886d68e..bd816af4a5 100644
--- a/src/testdir/test_blob.vim
+++ b/src/testdir/test_blob.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index 184b3772a0..0aadf4b496 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3728,
+/**/
3727,
/**/
3726,