From: Bernhard Reutner-Fischer Date: Sun, 4 Feb 2007 11:16:21 +0000 (-0000) Subject: - pull r17757 from trunk: fix stty's fix_param(). Closes #1193 X-Git-Tag: 1_4_2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bbbb7e02fcd116390eaa86d701b674ca3f3312f6;p=oweals%2Fbusybox.git - pull r17757 from trunk: fix stty's fix_param(). Closes #1193 --- 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; }