diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-24 16:46:14 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-24 16:46:14 +0000 |
commit | 5937c7505f444dd896f336fa0119a93a55ebe9a2 (patch) | |
tree | 0a4b41be25a8752a8063d15a63e808afe9df89a8 | |
parent | fa3b72348d88343390fbe212cfc230fec1602fc2 (diff) |
patch 8.2.3883: crash when switching to other regexp engine failsv8.2.3883
Problem: Crash when switching to other regexp engine fails.
Solution: Check for regprog being NULL.
-rw-r--r-- | src/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 10c8e617c9..14045267da 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4975,6 +4975,8 @@ ex_global(exarg_T *eap) // a match on this line? match = vim_regexec_multi(®match, curwin, curbuf, lnum, (colnr_T)0, NULL, NULL); + if (regmatch.regprog == NULL) + break; // re-compiling regprog failed if ((type == 'g' && match) || (type == 'v' && !match)) { ml_setmarked(lnum); diff --git a/src/version.c b/src/version.c index a77aa046f3..05b8120a98 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3883, +/**/ 3882, /**/ 3881, |