mlibc: Mescc-tools support: fix fgetc.
* mlibc/libc-mes.c (fgetc): Fix from completely fubar.
This commit is contained in:
parent
8eae2d81a4
commit
e4bb2e1762
|
@ -191,8 +191,11 @@ int
|
|||
fgetc (int fd)
|
||||
{
|
||||
char c;
|
||||
int i;
|
||||
int r = read (fd, &c, 1);
|
||||
return c == 1 ? c : (-1);
|
||||
if (r < 1) return -1;
|
||||
i = c;
|
||||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue