summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/params.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8e90f5b78..da6a6709a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2001-04-06 Sven Wischnowsky <wischnow@zsh.org>
+ * 13917: Src/params.c: test for unset in pipestatussetfn()
+
* 13916: Src/params.c: like 13907, but for backward searches
2001-04-05 Felix Rosencrantz <f_rosencrantz@yahoo.com>
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;
}
/**/