From 74230c5371c117dd2313eb3b3d9e1d644b63135f Mon Sep 17 00:00:00 2001 From: Alexander Vasiljev Date: Wed, 7 Apr 2021 12:05:27 +0300 Subject: [PATCH] lib_fgets: don't check for printability, as it doesn't allow to work with extended ASCII --- libs/libc/stdio/lib_libfgets.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/libc/stdio/lib_libfgets.c b/libs/libc/stdio/lib_libfgets.c index 29a36f023e1..7d7e949906d 100644 --- a/libs/libc/stdio/lib_libfgets.c +++ b/libs/libc/stdio/lib_libfgets.c @@ -216,11 +216,9 @@ FAR char *lib_fgets(FAR char *buf, size_t buflen, FILE *stream, } } - /* Otherwise, check if the character is printable and, if so, put the - * character in the line buffer - */ + /* Otherwise, put the character in the line buffer */ - else if (isprint(ch)) + else { buf[nch++] = ch;