Zip support bugfix from a newer kplib

git-svn-id: https://svn.eduke32.com/eduke32@4365 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-03-07 22:17:12 +00:00
parent 73b3199b7c
commit 206244b605

View file

@ -3060,7 +3060,7 @@ int32_t kzread(void *buffer, int32_t leng)
if (kzfs.comptyp == 0)
{
if (kzfs.pos != kzfs.i) //Seek only when position changes
fseek(kzfs.fil,kzfs.seek0+kzfs.pos,SEEK_SET);
{ fseek(kzfs.fil,kzfs.seek0+kzfs.pos,SEEK_SET); kzfs.i = kzfs.pos; }
i = min(kzfs.leng-kzfs.pos,leng);
fread(buffer,i,1,kzfs.fil);
kzfs.i += i; //kzfs.i is a local copy of ftell(kzfs.fil);