want reader and writer to return the actual byte count, not item count

This commit is contained in:
Yuichi Nishiwaki 2014-01-16 19:53:46 +09:00
parent 2ff0a5061b
commit 44be26b36f
1 changed files with 2 additions and 2 deletions

View File

@ -120,13 +120,13 @@ pic_funopen(void *cookie,
static int
file_read(void *cookie, char *ptr, int size)
{
return fread(ptr, size, 1, (FILE *)cookie);
return fread(ptr, 1, size, (FILE *)cookie);
}
static int
file_write(void *cookie, const char *ptr, int size)
{
return fwrite(ptr, size, 1, (FILE *)cookie);
return fwrite(ptr, 1, size, (FILE *)cookie);
}
static fpos_t