diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-21 22:25:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-21 22:25:51 +0200 |
commit | 7d5e744162c1e971e5a863e89787cadc8e56051c (patch) | |
tree | e409cf81b3c7b81930c3c75d06a9c13b3412e261 /src/evalfunc.c | |
parent | 420952175a652372affc78c0017d6049f20063c3 (diff) | |
download | vim-git-7d5e744162c1e971e5a863e89787cadc8e56051c.tar.gz |
patch 8.2.1265: crash with EXITFREE when split() failsv8.2.1265
Problem: Crash with EXITFREE when split() fails.
Solution: Restore 'cpoptions'.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 5de49c5d5..c07b1ab77 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -7859,9 +7859,9 @@ f_split(typval_T *argvars, typval_T *rettv) pat = (char_u *)"[\\x01- ]\\+"; if (rettv_list_alloc(rettv) == FAIL) - return; + goto theend; if (typeerr) - return; + goto theend; regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING); if (regmatch.regprog != NULL) @@ -7898,6 +7898,7 @@ f_split(typval_T *argvars, typval_T *rettv) vim_regfree(regmatch.regprog); } +theend: p_cpo = save_cpo; } |