diff options
-rw-r--r-- | colm/input.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/colm/input.c b/colm/input.c index 787a728d..a5c42806 100644 --- a/colm/input.c +++ b/colm/input.c @@ -290,8 +290,14 @@ void initFileFuncs() int fdGetDataImpl( SourceStream *is, char *dest, int length ) { - long got = read( is->fd, dest, length ); - return got; + if ( is->eof ) + return 0; + else { + long got = read( is->fd, dest, length ); + if ( got == 0 ) + is->eof = true; + return got; + } } void initFdFuncs() |