diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-06 07:49:27 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-06 07:49:27 +0000 |
commit | a971509182479d57b09f9bff122e8413a2421771 (patch) | |
tree | cfcf77cdefdde17358e54b8eb5d1d1f9eafc6e52 /Src/params.c | |
parent | 4b56a40b6c99318ebeeab86d4c5271aa9e51bc24 (diff) | |
download | zsh-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.c | 12 |
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; } /**/ |