about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compcore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index e8ea28400..4608b16d4 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1739,7 +1739,7 @@ addmatches(Cadata dat, char **argv)
 		    llpl -= gfl;
 		}
 	    }
-	    s = dat->ppre ? dat->ppre : "";
+	    s = dat->ppre ? dat->ppre : dupstring("");
 	    if ((ml = match_str(lpre, s, &bpl, 0, NULL, 0, 0, 1)) >= 0) {
 		if (matchsubs) {
 		    Cline tmp = get_cline(NULL, 0, NULL, 0, NULL, 0, 0);
@@ -1757,14 +1757,14 @@ addmatches(Cadata dat, char **argv)
 		bpadd = strlen(s) - ml;
 	    } else {
 		if (llpl <= lpl && strpfx(lpre, s))
-		    lpre = "";
+		    lpre = dupstring("");
 		else if (llpl > lpl && strpfx(s, lpre))
 		    lpre += lpl;
 		else
 		    *argv = NULL;
 		bcp = lpl;
 	    }
-	    s = dat->psuf ? dat->psuf : "";
+	    s = dat->psuf ? dat->psuf : dupstring("");
 	    if ((ml = match_str(lsuf, s, &bsl, 0, NULL, 1, 0, 1)) >= 0) {
 		if (matchsubs) {
 		    Cline tmp = get_cline(NULL, 0, NULL, 0, NULL, 0, CLF_SUF);
@@ -1782,7 +1782,7 @@ addmatches(Cadata dat, char **argv)
 		bsadd = strlen(s) - ml;
 	    } else {
 		if (llsl <= lsl && strsfx(lsuf, s))
-		    lsuf = "";
+		    lsuf = dupstring("");
 		else if (llsl > lsl && strsfx(s, lsuf))
 		    lsuf[llsl - lsl] = '\0';
 		else