:: commit 48ce450aa1b724fc513a97ae4780e7a032faed02

mintsuki <mintsuki@protonmail.com> — 2020-01-22 04:20

parents: 5082a450a0

Fix gets bug

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) {
tab: 248 wrap: offon