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 | |
parent | 4b56a40b6c99318ebeeab86d4c5271aa9e51bc24 (diff) | |
download | zsh-a971509182479d57b09f9bff122e8413a2421771.tar.gz zsh-a971509182479d57b09f9bff122e8413a2421771.tar.xz zsh-a971509182479d57b09f9bff122e8413a2421771.zip |
test for unset in pipestatussetfn() (13917)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Src/params.c | 12 |
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; } /**/ |