mirror of https://github.com/snes9xgit/snes9x.git
Correct unzStream revert
This commit is contained in:
parent
b3b38a6d1a
commit
a9aa8751a1
|
@ -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++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue