From 0f15147701a8d6f1b537802fa0d44034e92b1eea Mon Sep 17 00:00:00 2001 From: Lon Hohberger Date: Tue, 20 May 2025 15:19:11 -0400 Subject: [PATCH] edlib: Fix infinite loop on EOF --- edlib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edlib.c b/edlib.c index 3111541..35ddfa9 100644 --- a/edlib.c +++ b/edlib.c @@ -77,6 +77,9 @@ DAS_ARRAY_T *buffer = 0; +/* External variables */ +extern int exiting; + /* functions */ #ifndef __STDC__ @@ -403,6 +406,8 @@ read_line (char *prompt) } while (c != EOF && c != '\n'); #endif /* SHIFT_JIS */ + if (c == EOF) + exiting = 1; return DScstr (ds); }