From ee0d516d2ed5375539b62db0c58c597313e5137e Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 10 Dec 2016 09:44:54 +1000 Subject: [PATCH] Fix name is too short on linux telnet --- bbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bbs.c b/bbs.c index 8005e29..22d4d41 100644 --- a/bbs.c +++ b/bbs.c @@ -292,7 +292,7 @@ char s_getchar() { } } } - } while (c == '\n'); + } while (c == '\n' || c == '\0'); usertimeout = 10; return (char)c; @@ -313,6 +313,7 @@ void s_readstring(char *buffer, int max) { for (i=0;i 0) { buffer[i-1] = '\0'; i -= 2;