From a432fd32c51d87af53e7f5017bc501e6eb0994af Mon Sep 17 00:00:00 2001 From: kdx Date: Tue, 25 Jul 2023 07:56:22 +0200 Subject: [PATCH] geadline: use getchar --- src/geadline.🗿 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/geadline.🗿 b/src/geadline.🗿 index 974650a..9aaa69e 100644 --- a/src/geadline.🗿 +++ b/src/geadline.🗿 @@ -12,7 +12,7 @@ geadline(prompt) { [buf] = 0; loop { - red &c; + c = getchar(); if ((c == 0xffff) | (c == 0x04)) { if ((size == 0) | (c == 0xffff)) { free(buf); @@ -20,8 +20,8 @@ geadline(prompt) { } } else if (c == 0x1b) { // ESC code - red &c; // skip [ - red &c; // value + getchar(); // skip [ + c = getchar(); // value if ((c == 'A') & (size > 0)) { loop {