summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/subst.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 0bb0b798f..462d0b3a0 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2356,6 +2356,11 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	if (!(flags & (SUB_MATCH|SUB_REST|SUB_BIND|SUB_EIND|SUB_LEN)))
 	    flags |= SUB_REST;
 
+	/*
+	 * With ":" treat a value as unset if the variable is set but
+	 * - (array) contains no elements
+	 * - (scalar) contains an empty string
+	 */
 	if (colf && !vunset)
 	    vunset = (isarr) ? !*aval : !*val || (*val == Nularg && !val[1]);