[PATCH] input: Fix history line reading regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When a newline is encountered with history support, terminate
the loop immediately.

Fixes: 44ae22beedf8 ("input: Disable lleft in SMALL mode")
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---
 src/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input.c b/src/input.c
index 38969a7..fb9858f 100644
--- a/src/input.c
+++ b/src/input.c
@@ -301,7 +301,7 @@ again:
 		switch (c) {
 		case '\n':
 			parsefile->nleft = q - parsefile->nextc - 1;
-			goto check;
+			goto done;
 
 		default:
 			something = 1;
@@ -320,6 +320,7 @@ check:
 			break;
 		}
 	}
+done:
 	input_set_lleft(parsefile, more);
 
 	if (!IS_DEFINED_SMALL)
-- 
2.39.2

-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux