about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--msed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/msed.c b/msed.c
index bc1f121..3bcad9a 100644
--- a/msed.c
+++ b/msed.c
@@ -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;