diff --git a/engine/common/fs.c b/engine/common/fs.c index d5261589..91a819e1 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -516,7 +516,7 @@ int VFSPAK_ReadBytes (struct vfsfile_s *vfs, void *buffer, int bytestoread) int read; if (vfsp->currentpos - vfsp->startpos + bytestoread > vfsp->length) - bytestoread = vfsp->length - (vfsp->currentpos - vfsp->startpos + bytestoread); + bytestoread = vfsp->length - (vfsp->currentpos - vfsp->startpos); if (bytestoread <= 0) return -1;