about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-03-22 18:32:46 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-03-22 18:32:46 +0000
commit16f7f6961fc68c115d0ace129f51da2ffab2c052 (patch)
tree60fa008ae1501daac4c6740f8e6eee30654e1f0c
parent7b7905fedbd7d8b4b0791928c96682bb97057956 (diff)
downloadzsh-16f7f6961fc68c115d0ace129f51da2ffab2c052.tar.gz
zsh-16f7f6961fc68c115d0ace129f51da2ffab2c052.tar.xz
zsh-16f7f6961fc68c115d0ace129f51da2ffab2c052.zip
22375, 22376: ${(0)...} splits on NULL byte
-rw-r--r--ChangeLog5
-rw-r--r--Src/subst.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b7c6783cb..fb811cf93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-22  Peter Stephenson  <pws@csr.com>
+
+	* 22375 with tweak from Wayne, 22376: Doc/Zsh/expn.yo,
+	Src/subst.c: ${(0)...} splits on null bytes.
+
 2006-03-21  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* zsh-users/10047 : Doc/Zsh/zle.yo, Src/Zle/zle_thingy.c,
diff --git a/Src/subst.c b/Src/subst.c
index c79be3b76..6a4c26b6c 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -1274,6 +1274,13 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 		    sep = "\n";
 		    break;
 
+		case '0':
+		    spsep = zhalloc(3);
+		    spsep[0] = Meta;
+		    spsep[1] = '\0' ^ 32;
+		    spsep[2] = '\0';
+		    break;
+
 		case 's':
 		    tt = 1;
 		/* fall through */