summaryrefslogtreecommitdiff
path: root/usr.bin/mail/tty.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2014-01-17 18:42:31 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2014-01-17 18:42:31 +0000
commit845d7e29c84dafb737b7b30c970aa6e44c6fca0f (patch)
treea91c27b200d8200c8d33889bfaa4133737d09fb7 /usr.bin/mail/tty.c
parentbf4c178306bd896cd85bd43ecff6ae786bfa793d (diff)
ctype and other sign extension fixes.
with deraadt and millert, ok millert
Diffstat (limited to 'usr.bin/mail/tty.c')
-rw-r--r--usr.bin/mail/tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mail/tty.c b/usr.bin/mail/tty.c
index 8adc37a55fc..194281448c1 100644
--- a/usr.bin/mail/tty.c
+++ b/usr.bin/mail/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.19 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: tty.c,v 1.20 2014/01/17 18:42:30 okan Exp $ */
/* $NetBSD: tty.c,v 1.7 1997/07/09 05:25:46 mikel Exp $ */
/*
@@ -196,7 +196,7 @@ readtty(char *pr, char *src)
fflush(stdout);
#else
cp = src == NULL ? "" : src;
- while ((c = *cp++) != '\0') {
+ while ((c = (unsigned char)*cp++) != '\0') {
if ((c_erase != _POSIX_VDISABLE && c == c_erase) ||
(c_kill != _POSIX_VDISABLE && c == c_kill)) {
ch = '\\';
@@ -262,7 +262,7 @@ redo:
if (!ttyset)
return(strlen(canonb) > 0 ? savestr(canonb) : NULL);
while (*cp != '\0') {
- c = *cp++;
+ c = (unsigned char)*cp++;
if (c_erase != _POSIX_VDISABLE && c == c_erase) {
if (cp2 == canonb)
continue;