diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-02-04 11:13:57 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-02-04 11:13:57 +0000 |
commit | cbd6e657442ebec5bacf29ae69cbd954c7fac65d (patch) | |
tree | 9db883ea3c5924e529cc7145038e14bbdd9ab4c8 /coreutils/stty.c | |
parent | e99130340610a09de7581abe5c127c024347bc32 (diff) | |
download | busybox-w32-cbd6e657442ebec5bacf29ae69cbd954c7fac65d.tar.gz busybox-w32-cbd6e657442ebec5bacf29ae69cbd954c7fac65d.tar.bz2 busybox-w32-cbd6e657442ebec5bacf29ae69cbd954c7fac65d.zip |
- fix buglet introduced in r17351 in find_param(). Closes #1193
Diffstat (limited to 'coreutils/stty.c')
-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 c354aac9c..15cb05293 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -568,10 +568,11 @@ static int find_param(const char * const name) | |||
568 | NULL | 568 | NULL |
569 | }; | 569 | }; |
570 | int i = index_in_str_array(params, name); | 570 | int i = index_in_str_array(params, name); |
571 | if (i) { | 571 | if (i < 0) |
572 | if (!(i == 4 || i == 5)) | 572 | return 0; |
573 | i |= 0x80; | 573 | if (!(i == 4 || i == 5)) |
574 | } | 574 | i |= 0x80; |
575 | |||
575 | return i; | 576 | return i; |
576 | } | 577 | } |
577 | 578 | ||