Skip to content

Commit 4af4b98

Browse files
committed
load_mt2.cpp: fix MSVC C4090 warning
1 parent 962bfc7 commit 4af4b98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/load_mt2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ BOOL CSoundFile::ReadMT2(LPCBYTE lpStream, DWORD dwMemLength)
413413
#ifdef MT2DEBUG
414414
Log("Loading instruments at offset 0x%08X\n", dwMemPos);
415415
#endif
416-
memset(InstrMap, 0, sizeof(InstrMap));
417416
m_nInstruments = (pfh->wInstruments < MAX_INSTRUMENTS) ? pfh->wInstruments : MAX_INSTRUMENTS-1;
417+
for (UINT iIns=0; iIns< 255; iIns++) InstrMap[iIns]=NULL;
418418
for (UINT iIns=1; iIns<=255; iIns++)
419419
{
420420
if (dwMemPos+36 > dwMemLength) return TRUE;
@@ -556,8 +556,8 @@ BOOL CSoundFile::ReadMT2(LPCBYTE lpStream, DWORD dwMemLength)
556556
#ifdef MT2DEBUG
557557
Log("Loading samples at offset 0x%08X\n", dwMemPos);
558558
#endif
559-
memset(SampleMap, 0, sizeof(SampleMap));
560559
m_nSamples = (pfh->wSamples < MAX_SAMPLES) ? pfh->wSamples : MAX_SAMPLES-1;
560+
for (UINT iSmp=0; iSmp< 256; iSmp++) SampleMap[iSmp]=NULL;
561561
for (UINT iSmp=1; iSmp<=256; iSmp++)
562562
{
563563
if (dwMemPos > dwMemLength - 36) return TRUE;

0 commit comments

Comments
 (0)