archivers/zip.c
changeset 413 d669d303317d
parent 402 f539eb75380a
child 427 c38ace41039f
equal deleted inserted replaced
412:f743cf88c61f 413:d669d303317d
   417 
   417 
   418 
   418 
   419 static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
   419 static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
   420 {
   420 {
   421     PHYSFS_uint8 buf[256];
   421     PHYSFS_uint8 buf[256];
   422     PHYSFS_sint32 i;
   422     PHYSFS_sint32 i = 0;
   423     PHYSFS_sint64 filelen;
   423     PHYSFS_sint64 filelen;
   424     PHYSFS_sint64 filepos;
   424     PHYSFS_sint64 filepos;
   425     PHYSFS_sint32 maxread;
   425     PHYSFS_sint32 maxread;
   426     PHYSFS_sint32 totalread = 0;
   426     PHYSFS_sint32 totalread = 0;
   427     int found = 0;
   427     int found = 0;
   428     PHYSFS_uint32 extra;
   428     PHYSFS_uint32 extra = 0;
   429 
   429 
   430     filelen = __PHYSFS_platformFileLength(in);
   430     filelen = __PHYSFS_platformFileLength(in);
   431     BAIL_IF_MACRO(filelen == -1, NULL, 0);
   431     BAIL_IF_MACRO(filelen == -1, NULL, 0);
   432 
   432 
   433     /*
   433     /*