mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #291 from m-kress/master
added backspace to nTox; removed trailing spaces
This commit is contained in:
commit
d2f2fd35b1
|
@ -166,8 +166,8 @@ void line_eval(char lines[HISTORY][STRING_LENGTH], char *line)
|
||||||
}
|
}
|
||||||
else if (inpt_command == 'm') { //message command: /m friendnumber messsage
|
else if (inpt_command == 'm') { //message command: /m friendnumber messsage
|
||||||
size_t len = strlen(line);
|
size_t len = strlen(line);
|
||||||
if(len < 3)
|
if(len < 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char numstring[len-3];
|
char numstring[len-3];
|
||||||
char message[len-3];
|
char message[len-3];
|
||||||
|
@ -441,7 +441,7 @@ int main(int argc, char *argv[])
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
line_eval(lines, line);
|
line_eval(lines, line);
|
||||||
strcpy(line, "");
|
strcpy(line, "");
|
||||||
} else if (c == 127) {
|
} else if (c == 8 || c == 127) {
|
||||||
line[strlen(line)-1] = '\0';
|
line[strlen(line)-1] = '\0';
|
||||||
} else if (isalnum(c) || ispunct(c) || c == ' ') {
|
} else if (isalnum(c) || ispunct(c) || c == ' ') {
|
||||||
strcpy(line, appender(line, (char) c));
|
strcpy(line, appender(line, (char) c));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user