Fix backspace bug

This commit is contained in:
Andrew Pamment 2016-08-04 19:36:29 +10:00
parent 6b78526669
commit 9d1b2766ac

8
bbs.c
View File

@ -240,7 +240,9 @@ void s_readstring(int socket, char *buffer, int max) {
i -= 2;
s_putstring(socket, "\e[D \e[D");
continue;
}
} else if (c == '\b' || c == 127) {
continue;
}
if (c == '\n' || c == '\r') {
return;
@ -263,7 +265,9 @@ void s_readpass(int socket, char *buffer, int max) {
i-=2;
s_putstring(socket, "\e[D \e[D");
continue;
}
} else if (c == '\b' || c == 127) {
continue;
}
if (c == '\n' || c == '\r') {
return;