From: Bernhard Reutner-Fischer Date: Sun, 4 Feb 2007 11:13:57 +0000 (-0000) Subject: - fix buglet introduced in r17351 in find_param(). Closes #1193 X-Git-Tag: 1_5_1~203 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cbd6e657442ebec5bacf29ae69cbd954c7fac65d;p=oweals%2Fbusybox.git - fix buglet introduced in r17351 in find_param(). Closes #1193 --- 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; }