← Commit list

cbd6e6574

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2007-02-04
FAILED Duration: 15s

Subject

- fix buglet introduced in r17351 in find_param(). Closes #1193

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/stty.c+5 -4
@@ -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;
}