From bbbb7e02fcd116390eaa86d701b674ca3f3312f6 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 4 Feb 2007 11:16:21 +0000 Subject: [PATCH] - pull r17757 from trunk: fix stty's fix_param(). Closes #1193 --- coreutils/stty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/coreutils/stty.c b/coreutils/stty.c index 4e665bcb7..51aa66d40 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; } -- 2.25.1