Try to fix getchar

This commit is contained in:
Andrew Pamment 2016-08-07 12:37:07 +10:00
parent 82e4ba36e5
commit c28813fd79

8
bbs.c
View File

@ -204,7 +204,7 @@ char s_getchar() {
do { do {
if (sshBBS) { if (sshBBS) {
len = read(stdin, &c, 1); c = getchar();
} else { } else {
len = read(gSocket, &c, 1); len = read(gSocket, &c, 1);
} }
@ -236,9 +236,9 @@ char s_getchar() {
if (c == '\r') { if (c == '\r') {
if (len == 0) { if (len == 0) {
disconnect("Socket Closed"); disconnect("Socket Closed");
} }
} }
} while (c == '\n'); } while (c == '\n');
usertimeout = 10; usertimeout = 10;
return (char)c; return (char)c;
} }