mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Call gzrewind() before gzseek() for uncompressed files
This commit is contained in:
parent
126f8d1abc
commit
8c8642fdfa
|
@ -654,6 +654,8 @@ DslScanner::DslScanner( string const & fileName ) throw( Ex, Iconv::Ex ):
|
|||
// We need to rewind to that line so readNextLine() would return it again
|
||||
// next time it's called. To do that, we just use the slow gzseek() and
|
||||
// empty the read buffer.
|
||||
if( gzdirect( f ) ) // Without this ZLib 1.2.7 gzread() return 0
|
||||
gzrewind( f ); // after gzseek() call on uncompressed files
|
||||
gzseek( f, offset, SEEK_SET );
|
||||
readBufferPtr = readBuffer;
|
||||
readBufferLeft = 0;
|
||||
|
|
Loading…
Reference in a new issue