fix(IOB): EOF in stdin works

This commit is contained in:
Matteo Flebus 2026-01-22 14:05:49 +01:00
parent 609c1667af
commit fbc36f35b2
2 changed files with 11 additions and 6 deletions

View file

@ -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;