diff options
-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) 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; } |