fix for backspace fix

This commit is contained in:
Andrew Pamment 2016-08-04 19:49:56 +10:00
parent 75d8c07d9c
commit 3954817248

2
bbs.c
View File

@ -241,6 +241,7 @@ void s_readstring(int socket, char *buffer, int max) {
s_putstring(socket, "\e[D \e[D"); s_putstring(socket, "\e[D \e[D");
continue; continue;
} else if (c == '\b' || c == 127) { } else if (c == '\b' || c == 127) {
i -= 1;
continue; continue;
} }
@ -266,6 +267,7 @@ void s_readpass(int socket, char *buffer, int max) {
s_putstring(socket, "\e[D \e[D"); s_putstring(socket, "\e[D \e[D");
continue; continue;
} else if (c == '\b' || c == 127) { } else if (c == '\b' || c == 127) {
i -= 1;
continue; continue;
} }