Fix backspace bug
This commit is contained in:
parent
6b78526669
commit
9d1b2766ac
8
bbs.c
8
bbs.c
@ -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;
|
||||
|
Reference in New Issue
Block a user