Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-05-05 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:55 +0300
commit3901bf0ab88106a5b031cba7bc18d60cdebf7eef (patch)
tree808a2489abed822223b118b64e0553db80af6087 /CPP/7zip/Archive/Iso
parentbd1fa36322ac27f5715433b388742893d6524516 (diff)
4.58 beta
Diffstat (limited to 'CPP/7zip/Archive/Iso')
-rwxr-xr-xCPP/7zip/Archive/Iso/IsoIn.cpp14
-rwxr-xr-xCPP/7zip/Archive/Iso/IsoIn.h1
-rwxr-xr-xCPP/7zip/Archive/Iso/IsoItem.h4
3 files changed, 8 insertions, 11 deletions
diff --git a/CPP/7zip/Archive/Iso/IsoIn.cpp b/CPP/7zip/Archive/Iso/IsoIn.cpp
index 213b3014..f4896d37 100755
--- a/CPP/7zip/Archive/Iso/IsoIn.cpp
+++ b/CPP/7zip/Archive/Iso/IsoIn.cpp
@@ -12,19 +12,14 @@
namespace NArchive {
namespace NIso {
-HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
-{
- return ReadStream(_stream, data, size, &processedSize);
-}
-
Byte CInArchive::ReadByte()
{
if (m_BufferPos >= BlockSize)
m_BufferPos = 0;
if (m_BufferPos == 0)
{
- UInt32 processedSize;
- if (ReadBytes(m_Buffer, BlockSize, processedSize) != S_OK)
+ size_t processedSize = BlockSize;
+ if (ReadStream(_stream, m_Buffer, &processedSize) != S_OK)
throw 1;
if (processedSize != BlockSize)
throw 1;
@@ -192,7 +187,10 @@ void CInArchive::ReadDirRecord2(CDirRecord &r, Byte len)
void CInArchive::ReadDirRecord(CDirRecord &r)
{
- Byte len = ReadByte();
+ Byte len = ReadByte();
+ // Some CDs can have incorrect value len = 48 ('0') in VolumeDescriptor.
+ // But maybe we must use real "len" for other records.
+ len = 34;
ReadDirRecord2(r, len);
}
diff --git a/CPP/7zip/Archive/Iso/IsoIn.h b/CPP/7zip/Archive/Iso/IsoIn.h
index ab850bd9..4f9705c4 100755
--- a/CPP/7zip/Archive/Iso/IsoIn.h
+++ b/CPP/7zip/Archive/Iso/IsoIn.h
@@ -232,7 +232,6 @@ class CInArchive
bool _bootIsDefined;
CBootRecordDescriptor _bootDesc;
- HRESULT ReadBytes(void *data, UInt32 size, UInt32 &processedSize);
void Skeep(size_t size);
void SkeepZeros(size_t size);
Byte ReadByte();
diff --git a/CPP/7zip/Archive/Iso/IsoItem.h b/CPP/7zip/Archive/Iso/IsoItem.h
index e899d616..fcb9531f 100755
--- a/CPP/7zip/Archive/Iso/IsoItem.h
+++ b/CPP/7zip/Archive/Iso/IsoItem.h
@@ -36,9 +36,9 @@ struct CRecordingDateTime
if (!SystemTimeToFileTime(&st, &ft))
return false;
UInt64 value = (((UInt64)ft.dwHighDateTime) << 32) + ft.dwLowDateTime;
- value += (UInt64)((Int64)(int)GmtOffset * 15 * 60);
+ value -= (UInt64)((Int64)GmtOffset * 15 * 60 * 10000000);
ft.dwLowDateTime = (DWORD)value;
- ft.dwHighDateTime = DWORD(value >> 32);
+ ft.dwHighDateTime = (DWORD)(value >> 32);
return true;
}
};