[Scummvm-git-logs] scummvm master -> e56542808bebdecec70313404b5244a8f0878e82

NMIError 60350957+NMIError at users.noreply.github.com
Fri Jul 2 12:52:04 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e56542808b LURE: Fix invalid array and struct init


Commit: e56542808bebdecec70313404b5244a8f0878e82
    https://github.com/scummvm/scummvm/commit/e56542808bebdecec70313404b5244a8f0878e82
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-07-02T14:51:51+02:00

Commit Message:
LURE: Fix invalid array and struct init

Changed paths:
    engines/lure/sound.cpp


diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index cd2946fbcd..1171f75707 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -901,7 +901,7 @@ MidiDriver_ADLIB_Lure::MidiDriver_ADLIB_Lure() :
 		_pitchBendSensitivity(1) {
 	for (int i = 0; i < LURE_MAX_SOURCES; i++) {
 		for (int j = 0; j < MIDI_CHANNEL_COUNT; j++) {
-			_instrumentDefs[i][j] = { 0 };
+			memset(_instrumentDefs, 0, sizeof(_instrumentDefs));
 		}
 	}
 
@@ -952,7 +952,7 @@ void MidiDriver_ADLIB_Lure::metaEvent(int8 source, byte type, byte *data, uint16
 			// Instrument definitions use the AdLib BNK format, but omit the
 			// first 2 fields.
 			AdLibBnkInstrumentDefinition bnkInstDef;
-			bnkInstDef = { 0 };
+			memset(&bnkInstDef, 0, sizeof(bnkInstDef));
 			memcpy((uint8*)&bnkInstDef + 2, &data[6], sizeof(AdLibBnkInstrumentDefinition) - 2);
 			// Store the definition in the _instrumentDefs array.
 			bnkInstDef.toOplInstrumentDefinition(_instrumentDefs[source][channel]);




More information about the Scummvm-git-logs mailing list