summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 82645ccfa..079d9efde 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2918,6 +2918,19 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
 		}
 	    }
 	    deletehashtable(ht);
+	} else if (intersect) {
+	    /*
+	     * The intersection with nothing is nothing...
+	     * Seems a bit pointless complaining that the first
+	     * expression is unset here if the second is, too.
+	     */
+	    if (!vunset) {
+		if (isarr) {
+		    aval = mkarray(NULL);
+		} else {
+		    val = dupstring("");
+		}
+	    }
 	}
     } else {			/* no ${...=...} or anything, but possible modifiers. */
 	/*