summaryrefslogtreecommitdiff
path: root/com32/lib/sys/fileread.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/sys/fileread.c')
-rw-r--r--com32/lib/sys/fileread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/lib/sys/fileread.c b/com32/lib/sys/fileread.c
index fe20e64b..5e528b19 100644
--- a/com32/lib/sys/fileread.c
+++ b/com32/lib/sys/fileread.c
@@ -65,7 +65,7 @@ ssize_t __file_read(struct file_info *fp, void *buf, size_t count)
}
fp->i.filedes = oreg.esi.w[0];
- fp->i.nbytes = min(fp->i.length-fp->i.offset, (unsigned)MAXBLOCK);
+ fp->i.nbytes = oreg.ecx.l;
fp->i.datap = fp->i.buf;
memcpy(fp->i.buf, __com32.cs_bounce, fp->i.nbytes);
}