mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.513
Problem: Crash because reference count is wrong for list returned by getreg(). Solution: Increment the reference count. (Kimmy Lindvall) https://code.google.com/p/vim/source/detail?r=v7-4-513
This commit is contained in:
parent
89bab9b90e
commit
5e542ba56e
@ -9553,6 +9553,9 @@ static void f_getreg(typval_T *argvars, typval_T *rettv)
|
||||
rettv->v_type = VAR_LIST;
|
||||
rettv->vval.v_list =
|
||||
get_reg_contents(regname, (arg2 ? kGRegExprSrc : 0) | kGRegList);
|
||||
if (rettv->vval.v_list != NULL) {
|
||||
rettv->vval.v_list->lv_refcount++;
|
||||
}
|
||||
} else {
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = get_reg_contents(regname, arg2 ? kGRegExprSrc : 0);
|
||||
|
@ -225,7 +225,7 @@ static int included_patches[] = {
|
||||
//516,
|
||||
//515,
|
||||
//514,
|
||||
//513,
|
||||
513,
|
||||
//512 NA
|
||||
//511 NA
|
||||
//510 NA
|
||||
|
Loading…
Reference in New Issue
Block a user