Fixes my logic.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1782 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-01-03 21:29:47 +00:00
parent f077d9be3e
commit 33eadf8739

View file

@ -516,7 +516,7 @@ int VFSPAK_ReadBytes (struct vfsfile_s *vfs, void *buffer, int bytestoread)
int read; int read;
if (vfsp->currentpos - vfsp->startpos + bytestoread > vfsp->length) 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) if (bytestoread <= 0)
return -1; return -1;