Closes #107
Useless memcpy wasn't useless...
{
char* name;
unzFile zipfile;
+ unz_file_pos zippos;
guint32 size;
} VFS_PAKFILE;
if ( err != UNZ_OK ) {
break;
}
+ unz_file_pos pos;
+ err = unzGetFilePos( uf, &pos );
+ if ( err != UNZ_OK ) {
+ break;
+ }
file = (VFS_PAKFILE*)safe_malloc( sizeof( VFS_PAKFILE ) );
g_pakFiles = g_slist_append( g_pakFiles, file );
file->name = strdup( filename_inzip );
file->size = file_info.uncompressed_size;
file->zipfile = uf;
+ file->zippos = pos;
if ( ( i + 1 ) < gi.number_entry ) {
err = unzGoToNextFile( uf );
if ( count == index ) {
+ if ( unzGoToFilePos( file->zipfile, &file->zippos ) != UNZ_OK ) {
+ return -1;
+ }
if ( unzOpenCurrentFile( file->zipfile ) != UNZ_OK ) {
return -1;
}