diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-27 03:26:13 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-27 22:19:50 -0500 |
commit | 894fcb778e123a9986be480e94dc78b545e01ec4 (patch) | |
tree | 3ece268f8b71a2e892d256d8af72a8e2f80da4ff /src/nvim/eval.c | |
parent | 765d394f18733bc6d962e3915ff53c06ac095642 (diff) | |
download | rneovim-894fcb778e123a9986be480e94dc78b545e01ec4.tar.gz rneovim-894fcb778e123a9986be480e94dc78b545e01ec4.tar.bz2 rneovim-894fcb778e123a9986be480e94dc78b545e01ec4.zip |
glob2regpat(): handle empty string.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 33c584eede..25f3cbf180 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10792,7 +10792,7 @@ static void f_glob2regpat(typval_T *argvars, typval_T *rettv) char_u *pat = get_tv_string_chk(&argvars[0]); // NULL on type error rettv->v_type = VAR_STRING; - rettv->vval.v_string = (pat == NULL) + rettv->vval.v_string = (pat == NULL || *pat == NUL) ? NULL : file_pat_to_reg_pat(pat, NULL, NULL, false); } |