mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 20:53:29 +08:00
small fixes for CompoundFile
This commit is contained in:
@ -10,6 +10,7 @@ StreamView::StreamView(const SVector<Sector> §orChain, int sectorSize, Strea
|
||||
// if (sectorChain == null)
|
||||
// throw CFException("Sector Chain cannot be null");
|
||||
|
||||
auto pos = stream->tellg();
|
||||
if (sectorSize <= 0)
|
||||
throw CFException("Sector size must be greater than zero");
|
||||
}
|
||||
@ -172,7 +173,7 @@ void StreamView::SetLength(std::streamsize value)
|
||||
int StreamView::ReadInt32()
|
||||
{
|
||||
Read(reinterpret_cast<char*>(&buf), 0, 4);
|
||||
return ((buf & 0xFF) << 24) | ((buf & 0x00FF) << 16) | ((buf & 0x0000FF) << 8) | (buf & 0x000000FF);
|
||||
return buf;
|
||||
}
|
||||
|
||||
void StreamView::WriteInt32(int val)
|
||||
|
||||
Reference in New Issue
Block a user