diff options
Diffstat (limited to 'lzio.c')
-rw-r--r-- | lzio.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.c,v 1.4 1998/12/28 13:44:54 roberto Exp roberto $ | 2 | ** $Id: lzio.c,v 1.5 1999/02/25 19:13:56 roberto Exp roberto $ |
3 | ** a generic input stream interface | 3 | ** a generic input stream interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -41,9 +41,10 @@ ZIO* zsopen (ZIO* z, char* s, char *name) | |||
41 | 41 | ||
42 | /* -------------------------------------------------------------- FILEs --- */ | 42 | /* -------------------------------------------------------------- FILEs --- */ |
43 | 43 | ||
44 | static int zffilbuf (ZIO* z) | 44 | static int zffilbuf (ZIO* z) { |
45 | { | 45 | int n; |
46 | int n=fread(z->buffer,1,ZBSIZE,z->u); | 46 | if (feof(z->u)) return EOZ; |
47 | n=fread(z->buffer,1,ZBSIZE,z->u); | ||
47 | if (n==0) return EOZ; | 48 | if (n==0) return EOZ; |
48 | z->n=n-1; | 49 | z->n=n-1; |
49 | z->p=z->buffer; | 50 | z->p=z->buffer; |