From 44be26b36fe5dbbe3d5e1c447933fee38ea69a5e Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 16 Jan 2014 19:53:46 +0900 Subject: [PATCH] want reader and writer to return the actual byte count, not item count --- src/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/port.c b/src/port.c index ee1bfccb..14a94c90 100644 --- a/src/port.c +++ b/src/port.c @@ -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