diff options
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r-- | apps/app_minivm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 4cc2f4796..ff9ab340a 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -854,16 +854,16 @@ static int b64_inbuf(struct b64_baseio *bio, FILE *fi) if (bio->ateof) return 0; - if ((l = fread(bio->iobuf, 1, B64_BASEMAXINLINE,fi)) <= 0) { - if (ferror(fi)) - return -1; - + if ((l = fread(bio->iobuf, 1, B64_BASEMAXINLINE, fi)) != B64_BASEMAXINLINE) { bio->ateof = 1; - return 0; + if (l == 0) { + /* Assume EOF */ + return 0; + } } - bio->iolen= l; - bio->iocp= 0; + bio->iolen = l; + bio->iocp = 0; return 1; } |