fix the fgets hack

This commit is contained in:
Ali Mashtizadeh 2023-10-05 12:48:49 -04:00
parent e3711df1cb
commit 7f6b72c963

View File

@ -173,7 +173,8 @@ fgets(char *str, int size, FILE *fh)
return NULL;
if (ch == '\b') {
if (i > 0)
i -= 2;
i -= 1;
i -= 1;
continue;
}
str[i] = (char)ch;