msed: fix use of uninitialized memory

found by -fsanitize=memory
pull/163/head
Duncaen 5 years ago committed by Leah Neukirchen
parent 11ae5504fd
commit 74d8393fdf

@ -28,7 +28,7 @@ subst(char *str, char *srch, char *repl, char *flags)
#define APPC(c) do { if (b >= bufe) return str; *b++ = c; } while (0)
regex_t srchrx;
regmatch_t pmatch[10];
regmatch_t pmatch[10] = {0};
if (regcomp(&srchrx, srch, iflag ? REG_ICASE : 0) != 0)
return str;

Loading…
Cancel
Save