- pull r17757 from trunk: fix stty's fix_param(). Closes #1193
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 4 Feb 2007 11:16:21 +0000 (11:16 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 4 Feb 2007 11:16:21 +0000 (11:16 -0000)
coreutils/stty.c

index 4e665bcb767dcd9274ed6293ef536caec58e7d72..51aa66d40c25fc1f0ad741c23f950377048293d8 100644 (file)
@@ -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;
 }