summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-12-18 14:51:30 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-12-18 14:51:30 +0000
commitb9f675c0e09a5727887f74b8c1dafc36dfce0796 (patch)
treeee07d01fbfcadd9a2193b0ab842e233e81585d42
parent68d739c67a10db0b97b0efaaa730f71bf47f4ab5 (diff)
downloadzsh-b9f675c0e09a5727887f74b8c1dafc36dfce0796.tar.gz
zsh-b9f675c0e09a5727887f74b8c1dafc36dfce0796.tar.xz
zsh-b9f675c0e09a5727887f74b8c1dafc36dfce0796.zip
16364: further to 16351, except specials from having their value cleared
-rw-r--r--ChangeLog3
-rw-r--r--Src/params.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d1a0a34f3..ece3c3516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-12-18  Oliver Kiddle  <opk@zsh.org>
 
+	* 16364: Src/params.c: further to 16351, except specials
+	from having their value set to null
+
 	* unposted: Src/params.c: small fix to += code from 16353
 
 2001-12-18  Clint Adams  <clint@zsh.org>
diff --git a/Src/params.c b/Src/params.c
index 35f699033..1a04d7904 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2286,7 +2286,10 @@ stdunsetfn(Param pm, int exp)
 	case PM_SCALAR: pm->sets.cfn(pm, NULL); break;
 	case PM_ARRAY:  pm->sets.afn(pm, NULL); break;
 	case PM_HASHED: pm->sets.hfn(pm, NULL); break;
-	default: pm->u.str = NULL; break;
+	default:
+	    if (!(pm->flags & PM_SPECIAL))
+	    	pm->u.str = NULL;
+	    break;
     }
     pm->flags |= PM_UNSET;
 }