From c2673474571fad5801276b6192a57aba7899ad8b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 26 Apr 2001 23:59:59 +0000 Subject: [PATCH] * find.c (search_content): Undo a recent change that caused an infinite loop. --- src/ChangeLog | 5 +++++ src/find.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 721efed8f..1cdf0a69e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-04-26 Pavel Roskin + + * find.c (search_content): Undo a recent change that caused an + infinite loop. + 2001-04-24 Andrew V. Samoilov * view.c (get_line_at): previous newline is right condition diff --git a/src/find.c b/src/find.c index 5b48f0ee4..0918e73c4 100644 --- a/src/find.c +++ b/src/find.c @@ -468,7 +468,10 @@ search_content (Dlg_head *h, char *directory, char *filename) enable_interrupt_key (); got_interrupt (); - while ((i = read (pipe, &c, 1)) == 0){ + while (1){ + i = read (pipe, &c, 1); + if (i == 0) + break; if (c == '\n'){ p = buffer;