From c28813fd79d6fab689fc3ca2a19240f91d4e2907 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 7 Aug 2016 12:37:07 +1000 Subject: [PATCH] Try to fix getchar --- bbs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bbs.c b/bbs.c index 005e9da..23e6da1 100644 --- a/bbs.c +++ b/bbs.c @@ -204,7 +204,7 @@ char s_getchar() { do { if (sshBBS) { - len = read(stdin, &c, 1); + c = getchar(); } else { len = read(gSocket, &c, 1); } @@ -236,9 +236,9 @@ char s_getchar() { if (c == '\r') { if (len == 0) { disconnect("Socket Closed"); - } - } - } while (c == '\n'); + } + } + } while (c == '\n'); usertimeout = 10; return (char)c; }