Fix gets bug

This commit is contained in:
mintsuki 2020-01-22 05:20:11 +01:00
parent 5082a450a0
commit 48ce450aa1

View File

@ -21,9 +21,9 @@ void gets(char *buf, size_t limit) {
text_write(&c, 1);
}
continue;
case '\n':
case '\r':
buf[i] = 0;
text_write(&c, 1);
text_write("\n", 1);
return;
}
if (i < limit-1) {