cli: Terminate the string in cread_line_process_ch()

Rather than relying on the caller, terminate the string inside this
function. Do this each time we return, whether input is finished or
not. It is not needed when the input is aborted, since the string will
be discarded in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
1 file changed