From 60d78200938faa72f531172299b7dfeebcbede47 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Wed, 2 Nov 2022 00:40:46 +0100
Subject: [PATCH] Revert "cli_readline: Only insert printable chars"
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

This reverts commit d2e64d29c44dee6d455f7705dd1cf1af8674ad9a.

This commit broke support for pound sign (£) and euro sign (€) keys on
Nokia N900 keypad.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 common/cli_readline.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/cli_readline.c b/common/cli_readline.c
index f6e2bcdece..d6444f5fc1 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -517,10 +517,8 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
 		}
 #endif
 		default:
-			if (ichar >= ' ' && ichar <= '~') {
-				cread_add_char(ichar, insert, &num, &eol_num,
-					       buf, *len);
-			}
+			cread_add_char(ichar, insert, &num, &eol_num, buf,
+				       *len);
 			break;
 		}
 	}
-- 
2.39.5