mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-01-24 08:53:04 +00:00
feat: dump t6 xbox fastfile data
This commit is contained in:
@@ -223,19 +223,18 @@ namespace
|
||||
}
|
||||
|
||||
const size_t readSize = m_base_stream->Load(&chunkSize, sizeof(chunkSize));
|
||||
if (m_endianness == GameEndianness::LE)
|
||||
chunkSize = endianness::FromLittleEndian(chunkSize);
|
||||
else
|
||||
chunkSize = endianness::FromBigEndian(chunkSize);
|
||||
|
||||
if (readSize == 0)
|
||||
if (readSize < sizeof(chunkSize) || chunkSize == 0)
|
||||
{
|
||||
m_eof_reached = true;
|
||||
m_eof_stream = streamNum;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_endianness == GameEndianness::LE)
|
||||
chunkSize = endianness::FromLittleEndian(chunkSize);
|
||||
else
|
||||
chunkSize = endianness::FromBigEndian(chunkSize);
|
||||
|
||||
if (chunkSize > m_chunk_size)
|
||||
{
|
||||
throw InvalidChunkSizeException(chunkSize, m_chunk_size);
|
||||
|
||||
Reference in New Issue
Block a user