From 48ce450aa1b724fc513a97ae4780e7a032faed02 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Wed, 22 Jan 2020 05:20:11 +0100 Subject: [PATCH] Fix gets bug --- src/lib/blib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/blib.c b/src/lib/blib.c index 2d5d1ff8..6e20c0b9 100644 --- a/src/lib/blib.c +++ b/src/lib/blib.c @@ -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) {