diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2015-10-18 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:56 +0300 |
commit | a663a6deb7a150f935fac7efdbf4d53d27369594 (patch) | |
tree | d1be306b33dd96050206da5774fff7bd9083ddfa /CPP/7zip/Archive/Iso | |
parent | 6543c280208393fa32cb0094f770d14c1cfb13b2 (diff) |
15.0915.09
Diffstat (limited to 'CPP/7zip/Archive/Iso')
-rw-r--r-- | CPP/7zip/Archive/Iso/IsoHandler.cpp | 8 | ||||
-rw-r--r-- | CPP/7zip/Archive/Iso/IsoIn.cpp | 8 | ||||
-rw-r--r-- | CPP/7zip/Archive/Iso/IsoIn.h | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/CPP/7zip/Archive/Iso/IsoHandler.cpp b/CPP/7zip/Archive/Iso/IsoHandler.cpp index 713764d9..91bf1a25 100644 --- a/CPP/7zip/Archive/Iso/IsoHandler.cpp +++ b/CPP/7zip/Archive/Iso/IsoHandler.cpp @@ -323,7 +323,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, { lps->InSize = lps->OutSize = currentTotalSize + offset; const CDir &item2 = ref.Dir->_subItems[ref.Index + e]; - RINOK(_stream->Seek((UInt64)item2.ExtentLocation * _archive.BlockSize, STREAM_SEEK_SET, NULL)); + RINOK(_stream->Seek((UInt64)item2.ExtentLocation * kBlockSize, STREAM_SEEK_SET, NULL)); streamSpec->Init(item2.Size); RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); if (copyCoderSpec->TotalSize != item2.Size) @@ -336,7 +336,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, } else { - RINOK(_stream->Seek(blockIndex * _archive.BlockSize, STREAM_SEEK_SET, NULL)); + RINOK(_stream->Seek((UInt64)blockIndex * kBlockSize, STREAM_SEEK_SET, NULL)); streamSpec->Init(currentItemSize); RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); if (copyCoderSpec->TotalSize != currentItemSize) @@ -379,7 +379,7 @@ STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) if (item.Size == 0) continue; CSeekExtent se; - se.Phy = (UInt64)item.ExtentLocation * _archive.BlockSize; + se.Phy = (UInt64)item.ExtentLocation * kBlockSize; se.Virt = virtOffset; extentStreamSpec->Extents.Add(se); virtOffset += item.Size; @@ -405,7 +405,7 @@ STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) blockIndex = be.LoadRBA; } - return CreateLimitedInStream(_stream, blockIndex * _archive.BlockSize, currentItemSize, stream); + return CreateLimitedInStream(_stream, (UInt64)blockIndex * kBlockSize, currentItemSize, stream); COM_TRY_END } diff --git a/CPP/7zip/Archive/Iso/IsoIn.cpp b/CPP/7zip/Archive/Iso/IsoIn.cpp index 39034b63..1c7dd11e 100644 --- a/CPP/7zip/Archive/Iso/IsoIn.cpp +++ b/CPP/7zip/Archive/Iso/IsoIn.cpp @@ -88,15 +88,15 @@ AString CBootInitialEntry::GetName() const Byte CInArchive::ReadByte() { - if (m_BufferPos >= BlockSize) + if (m_BufferPos >= kBlockSize) m_BufferPos = 0; if (m_BufferPos == 0) { - size_t processed = BlockSize; + size_t processed = kBlockSize; HRESULT res = ReadStream(_stream, m_Buffer, &processed); if (res != S_OK) throw CSystemException(res); - if (processed != BlockSize) + if (processed != kBlockSize) throw CUnexpectedEndException(); UInt64 end = _position + processed; if (PhySize < end) @@ -511,7 +511,7 @@ HRESULT CInArchive::Open2() PhySize = _position; m_BufferPos = 0; - BlockSize = kBlockSize; + // BlockSize = kBlockSize; for (;;) { diff --git a/CPP/7zip/Archive/Iso/IsoIn.h b/CPP/7zip/Archive/Iso/IsoIn.h index c2007bce..5c1a4bcf 100644 --- a/CPP/7zip/Archive/Iso/IsoIn.h +++ b/CPP/7zip/Archive/Iso/IsoIn.h @@ -282,7 +282,7 @@ public: CRecordVector<CRef> Refs; CObjectVector<CVolumeDescriptor> VolDescs; int MainVolDescIndex; - UInt32 BlockSize; + // UInt32 BlockSize; CObjectVector<CBootInitialEntry> BootEntries; bool IsArc; @@ -297,8 +297,8 @@ public: void UpdatePhySize(UInt32 blockIndex, UInt64 size) { - UInt64 alignedSize = (size + BlockSize - 1) & ~((UInt64)BlockSize - 1); - UInt64 end = blockIndex * BlockSize + alignedSize; + const UInt64 alignedSize = (size + kBlockSize - 1) & ~((UInt64)kBlockSize - 1); + const UInt64 end = (UInt64)blockIndex * kBlockSize + alignedSize; if (PhySize < end) PhySize = end; } @@ -315,7 +315,7 @@ public: size = (1440 << 10); else if (be.BootMediaType == NBootMediaType::k2d88Floppy) size = (2880 << 10); - UInt64 startPos = (UInt64)be.LoadRBA * BlockSize; + UInt64 startPos = (UInt64)be.LoadRBA * kBlockSize; if (startPos < _fileSize) { if (_fileSize - startPos < size) |