getline() and getdelim() must return -1 if EOF was reached and no bytes
were read.
This commit is contained in:
parent
d33737d585
commit
509f293a99
@ -812,7 +812,7 @@ int NEW(fclose)(FILE *fp)
|
|||||||
if(chr == EOF) \
|
if(chr == EOF) \
|
||||||
{ \
|
{ \
|
||||||
finished = 1; \
|
finished = 1; \
|
||||||
ret = done; \
|
ret = done ? done : -1; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user