diff options
Diffstat (limited to 'src/archive/plugins')
-rw-r--r-- | src/archive/plugins/ZzipArchivePlugin.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx index b4dc7029f..21cb693d8 100644 --- a/src/archive/plugins/ZzipArchivePlugin.cxx +++ b/src/archive/plugins/ZzipArchivePlugin.cxx @@ -168,12 +168,13 @@ bool ZzipInputStream::Seek(offset_type new_offset, Error &error) { zzip_off_t ofs = zzip_seek(file, new_offset, SEEK_SET); - if (ofs != -1) { + if (ofs < 0) { error.Set(zzip_domain, "zzip_seek() has failed"); - offset = ofs; - return true; + return false; } - return false; + + offset = ofs; + return true; } /* exported structures */ |