blob: d9b95486a838a74e434e06f94e1ca5d43b78e5f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
$NetBSD: patch-lib_ttyutils.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
Fix ctype(3) abuse.
--- lib/ttyutils.c.orig 2018-07-11 13:34:54.228003727 +0000
+++ lib/ttyutils.c
@@ -104,7 +104,7 @@ int get_terminal_name(const char **path,
*name = tty;
if (number) {
for (p = tty; p && *p; p++) {
- if (isdigit(*p)) {
+ if (isdigit((unsigned char)*p)) {
*number = p;
break;
}
|