about summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-06 07:49:27 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-06 07:49:27 +0000
commita971509182479d57b09f9bff122e8413a2421771 (patch)
treecfcf77cdefdde17358e54b8eb5d1d1f9eafc6e52 /Src/params.c
parent4b56a40b6c99318ebeeab86d4c5271aa9e51bc24 (diff)
downloadzsh-a971509182479d57b09f9bff122e8413a2421771.tar.gz
zsh-a971509182479d57b09f9bff122e8413a2421771.tar.xz
zsh-a971509182479d57b09f9bff122e8413a2421771.zip
test for unset in pipestatussetfn() (13917)
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Src/params.c b/Src/params.c
index 2475f2861..3bca12bd8 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2873,11 +2873,15 @@ pipestatgetfn(Param pm)
 static void
 pipestatsetfn(Param pm, char **x)
 {
-    int i;
+    if (x) {
+        int i;
 
-    for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
-	pipestats[i] = atoi(*x);
-    numpipestats = i;
+        for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
+            pipestats[i] = atoi(*x);
+            numpipestats = i;
+    }
+    else
+        numpipestats = 0;
 }
 
 /**/