1498 |
while (RemainingBytes() >= CHUNK_HEADER_SIZE(pFile->FileOffsetSize)) { |
while (RemainingBytes() >= CHUNK_HEADER_SIZE(pFile->FileOffsetSize)) { |
1499 |
Chunk* ck; |
Chunk* ck; |
1500 |
uint32_t ckid; |
uint32_t ckid; |
1501 |
Read(&ckid, 4, 1); |
// return value check is required here to prevent a potential |
1502 |
|
// garbage data use of 'ckid' below in case Read() failed |
1503 |
|
if (Read(&ckid, 4, 1) != 4) |
1504 |
|
throw Exception("LoadSubChunks(): Failed reading RIFF chunk ID"); |
1505 |
#if DEBUG_RIFF |
#if DEBUG_RIFF |
1506 |
std::cout << " ckid=" << convertToString(ckid) << std::endl; |
std::cout << " ckid=" << convertToString(ckid) << std::endl; |
1507 |
#endif // DEBUG_RIFF |
#endif // DEBUG_RIFF |