summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/finger/net.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c
index f5789ad..697e862 100644
--- a/usr.bin/finger/net.c
+++ b/usr.bin/finger/net.c
@@ -141,15 +141,16 @@ netfinger(name)
int lastc = '\n';
while ((c = getc(fp)) != EOF) {
- c &= 0x7f;
if (c == 0x0d) {
if (lastc == '\r') /* ^M^M - skip dupes */
continue;
c = '\n';
lastc = '\r';
} else {
- if (!isprint(c) && !isspace(c))
+ if (!isprint(c) && !isspace(c)) {
+ c &= 0x7f;
c |= 0x40;
+ }
if (lastc != '\r' || c != '\n')
lastc = c;
else {
OpenPOWER on IntegriCloud