aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term/9term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/9term/9term.c')
-rw-r--r--src/cmd/9term/9term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
index 7efce4ad..12d4be03 100644
--- a/src/cmd/9term/9term.c
+++ b/src/cmd/9term/9term.c
@@ -1021,7 +1021,8 @@ consread(void)
s = setecho(sfd, 0);
if(write(rcfd, buf, n) < 0)
exits(0);
- setecho(sfd, s);
+ if(s)
+ setecho(sfd, s);
}
}