Skip to content
Snippets Groups Projects
Commit 9ac8ffc5 authored by patacongo's avatar patacongo
Browse files

Fix a nasty bug that was closing stdin

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3663 42af7a65-404d-4744-a932-0658087f49c3
parent 2c351f21
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,10 @@ static const char g_erasetoeol[] = "\033[K";
static inline int _lib_rawgetc(int fd)
{
char buffer;
if (read(fd, &buffer, 1) < 1)
ssize_t nread;
nread = read(fd, &buffer, 1);
if (nread < 1)
{
/* Return EOF if the end of file (0) or error (-1) occurs */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment