diff options
| author | Martin Ridgers <[email protected]> | 2023-02-21 12:59:13 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2023-02-22 08:13:50 +0100 |
| commit | cf5fa9f46d45508063d279ef36990173b840fdba (patch) | |
| tree | 311b262d77846814188d78fc14d8a1ef4da041c3 /zenserver/frontend/zipfs.cpp | |
| parent | Magic value for Zip LocalFileHeader struct was incorrect (diff) | |
| download | zen-cf5fa9f46d45508063d279ef36990173b840fdba.tar.xz zen-cf5fa9f46d45508063d279ef36990173b840fdba.zip | |
The start of a Zip archive can be calculated using its own data
Diffstat (limited to 'zenserver/frontend/zipfs.cpp')
| -rw-r--r-- | zenserver/frontend/zipfs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zenserver/frontend/zipfs.cpp b/zenserver/frontend/zipfs.cpp index fa19efc00..f9c2bc8ff 100644 --- a/zenserver/frontend/zipfs.cpp +++ b/zenserver/frontend/zipfs.cpp @@ -118,7 +118,7 @@ ZipFs::ZipFs(IoBuffer&& Buffer) return; } - Cursor -= View.GetSize(); + Cursor = (uint8_t*)EocdCursor - uint32_t(EocdCursor->CdOffset) - uint32_t(EocdCursor->CdSize); const auto* CdCursor = (CentralDirectoryRecord*)(Cursor + EocdCursor->CdOffset); for (int i = 0, n = EocdCursor->CdRecordCount; i < n; ++i) |