more accurate emulation of fread in memio

This commit is contained in:
Roman Fomin 2023-05-11 07:55:43 +07:00
parent 26876ee72d
commit f5276845cf

View File

@ -68,6 +68,11 @@ size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream)
return -1;
}
if (size == 0 || nmemb == 0)
{
return 0;
}
if (read_eof)
{
stream->eof = true;