comparison src/ex_cmds.c @ 26709:0c5daf5e5514 v8.2.3883

patch 8.2.3883: crash when switching to other regexp engine fails Commit: https://github.com/vim/vim/commit/5937c7505f444dd896f336fa0119a93a55ebe9a2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 16:46:14 2021 +0000 patch 8.2.3883: crash when switching to other regexp engine fails Problem: Crash when switching to other regexp engine fails. Solution: Check for regprog being NULL.
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 18:00:03 +0100
parents a2e6da79274d
children 3a2b222107a6
comparison
equal deleted inserted replaced
26708:f0d7cb510ce3 26709:0c5daf5e5514
4973 for (lnum = eap->line1; lnum <= eap->line2 && !got_int; ++lnum) 4973 for (lnum = eap->line1; lnum <= eap->line2 && !got_int; ++lnum)
4974 { 4974 {
4975 // a match on this line? 4975 // a match on this line?
4976 match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum, 4976 match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
4977 (colnr_T)0, NULL, NULL); 4977 (colnr_T)0, NULL, NULL);
4978 if (regmatch.regprog == NULL)
4979 break; // re-compiling regprog failed
4978 if ((type == 'g' && match) || (type == 'v' && !match)) 4980 if ((type == 'g' && match) || (type == 'v' && !match))
4979 { 4981 {
4980 ml_setmarked(lnum); 4982 ml_setmarked(lnum);
4981 ndone++; 4983 ndone++;
4982 } 4984 }