mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
fix(f_insert): partially port v8.2.0634
Fixes a crash in f_insert() when inserting into a NULL blob. Include blob-related test changes and some other simple changes.
This commit is contained in:
@@ -4984,6 +4984,10 @@ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
bool error = false;
|
||||
|
||||
if (argvars[0].v_type == VAR_BLOB) {
|
||||
if (argvars[0].vval.v_blob == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
long before = 0;
|
||||
const int len = tv_blob_len(argvars[0].vval.v_blob);
|
||||
|
||||
|
Reference in New Issue
Block a user