fix(IOB): EOF in stdin works
This commit is contained in:
parent
609c1667af
commit
fbc36f35b2
2 changed files with 11 additions and 6 deletions
|
|
@ -85,7 +85,11 @@ ssize_t stream_read(char **stream)
|
|||
if (nread == -1)
|
||||
{
|
||||
state = IOB_STATE_FINISHED;
|
||||
return 0;
|
||||
// MAGNIFICO
|
||||
// malloc(1);
|
||||
*stream_buf = EOF;
|
||||
*stream = stream_buf;
|
||||
return 1;
|
||||
}
|
||||
else if (nread < 0)
|
||||
state = IOB_STATE_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue