mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 05:48:03 -04:00
memio: fix EOF reset
This commit is contained in:
parent
8ddecfedfa
commit
a37167944c
12
src/memio.c
12
src/memio.c
@ -81,8 +81,16 @@ size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream)
|
||||
{
|
||||
items = (stream->buflen - stream->position) / size;
|
||||
}
|
||||
|
||||
read_eof = (items > 0 ? false : true);
|
||||
|
||||
if (items > 0)
|
||||
{
|
||||
read_eof = false;
|
||||
stream->eof = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
read_eof = true;
|
||||
}
|
||||
|
||||
// Copy bytes to buffer
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user