Correct unzStream revert

This commit is contained in:
OV2 2017-06-12 22:38:07 +02:00
parent b3b38a6d1a
commit a9aa8751a1
1 changed files with 1 additions and 0 deletions

View File

@ -438,6 +438,7 @@ int unzStream::revert (size_t from, size_t offset)
else // outside of buffer, reset file and read until pos else // outside of buffer, reset file and read until pos
{ {
unzGoToFilePos(file, &unz_file_start_pos); unzGoToFilePos(file, &unz_file_start_pos);
unzOpenCurrentFile(file); // necessary to reopen after seek
int times_to_read = target_pos / unz_BUFFSIZ + 1; int times_to_read = target_pos / unz_BUFFSIZ + 1;
for( int i = 0; i < times_to_read; i++) for( int i = 0; i < times_to_read; i++)
{ {