Simon Glass be0169f07e cli: Correct handling of invalid escape sequences in cread_line()
The second call to cli_ch_process() is in the wrong place, meaning that
the one of the characters of an invalid escape sequence is swallowed
instead of being returned.

Fix the bug and add a test to cover this.

This behaviour matches that of the code before cli_getch() was
introduced. This was verified on the commit before b08e9d4b66 i.e.:

   7d850f85aad ("sandbox: Enable mmc command and legacy images")

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-03-28 09:25:51 -04:00
..
2023-02-06 13:04:53 -05:00
2023-03-09 08:50:48 -08:00
2023-03-13 13:56:14 +01:00
2023-02-23 13:29:20 -05:00
2023-02-06 17:10:15 -05:00
2022-08-10 13:38:30 -04:00
run
2022-10-21 21:37:47 -04:00