diff --git a/src/port.c b/src/port.c index d6019ac9..4241f3e8 100644 --- a/src/port.c +++ b/src/port.c @@ -104,6 +104,7 @@ pic_funopen(void *cookie, if (! file) { return NULL; } + file->flags = 0; /* no buffering at the beginning */ file->buf = NULL; file->mode = _IONBF;