diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-04-13 20:35:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-04-13 20:35:20 +0000 |
commit | eca1a7d6c39555f66902b8faa943449f179d46f1 (patch) | |
tree | 4e5dbd7f1de5f3741dcc119b5b44fbbe964c907b /lib/libedit/map.c | |
parent | a0a4005e460021d4bf2e02d9dee6d5f45b2d8ce1 (diff) |
Another case where we need to use u_char, not char for array
subscripts to avoid buf[-1] problems.
Also add a missing include of unistd.h. OK'd by Theo
Diffstat (limited to 'lib/libedit/map.c')
-rw-r--r-- | lib/libedit/map.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 44e68607d5a..00283efa6cc 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.4 1998/08/16 20:24:53 millert Exp $ */ +/* $OpenBSD: map.c,v 1.5 2001/04/13 20:35:19 millert Exp $ */ /* $NetBSD: map.c,v 1.3 1997/01/11 06:48:00 lukem Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #else -static char rcsid[] = "$OpenBSD: map.c,v 1.4 1998/08/16 20:24:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: map.c,v 1.5 2001/04/13 20:35:19 millert Exp $"; #endif #endif /* not lint && not SCCSID */ @@ -968,7 +968,7 @@ private void map_init_meta(el) EditLine *el; { - char buf[3]; + unsigned char buf[3]; register int i; el_action_t *map = el->el_map.key; el_action_t *alt = el->el_map.alt; @@ -987,7 +987,7 @@ map_init_meta(el) else map = alt; } - buf[0] = (char) i; + buf[0] = (unsigned char) i; buf[2] = 0; for (i = 0200; i <= 0377; i++) switch (map[i]) { |