Small fixes

This commit is contained in:
mathbunnyru
2016-11-24 02:02:38 +03:00
parent eff28c55bf
commit 5e1d9fad31
6 changed files with 12 additions and 9 deletions

View File

@ -586,9 +586,9 @@ void XM::File::read(bool)
unsigned int count = 4 + instrument.read(*this, instrumentHeaderSize - 4U);
READ_ASSERT(count == std::min(instrumentHeaderSize, (unsigned long)instrument.size() + 4));
unsigned long sampleHeaderSize = 0;
long offset = 0;
if(sampleCount > 0) {
unsigned long sampleHeaderSize = 0;
sumSampleCount += sampleCount;
// wouldn't know which header size to assume otherwise:
READ_ASSERT(instrumentHeaderSize >= count + 4 && readU32L(sampleHeaderSize));