diff options
author | Bernhard Reutner-Fischer | 2007-02-04 11:13:57 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2007-02-04 11:13:57 +0000 |
commit | cbd6e657442ebec5bacf29ae69cbd954c7fac65d (patch) | |
tree | 9db883ea3c5924e529cc7145038e14bbdd9ab4c8 | |
parent | e99130340610a09de7581abe5c127c024347bc32 (diff) | |
download | busybox-cbd6e657442ebec5bacf29ae69cbd954c7fac65d.zip busybox-cbd6e657442ebec5bacf29ae69cbd954c7fac65d.tar.gz |
- fix buglet introduced in r17351 in find_param(). Closes #1193
-rw-r--r-- | coreutils/stty.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index c354aac..15cb052 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -568,10 +568,11 @@ static int find_param(const char * const name) NULL }; int i = index_in_str_array(params, name); - if (i) { - if (!(i == 4 || i == 5)) - i |= 0x80; - } + if (i < 0) + return 0; + if (!(i == 4 || i == 5)) + i |= 0x80; + return i; } |