readline: fix backspace

This commit is contained in:
Mathieu Maret 2021-11-06 00:23:45 +01:00
parent 69d4702696
commit 29017f7f7e

View File

@ -539,6 +539,7 @@ int readline(char *buf, int size)
if(key == '\b' && i>=1){
buf[i-1] = '\0';
i-=2;
continue;
}
buf[i] = key;