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:
parent
f077d9be3e
commit
33eadf8739
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue