Skip to content

Commit

Permalink
Merge pull request #301 from rsp4jack/master
Browse files Browse the repository at this point in the history
Zero value initiation MIDIHDR to avoid crashes
  • Loading branch information
garyscavone authored Jun 15, 2023
2 parents 5975dbe + fb46e08 commit 611a715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3086,7 +3086,7 @@ void MidiOutWinMM :: sendMessage( const unsigned char *message, size_t size )
for ( unsigned int i=0; i<nBytes; ++i ) buffer[i] = message[i];

// Create and prepare MIDIHDR structure.
MIDIHDR sysex;
MIDIHDR sysex{};
sysex.lpData = (LPSTR) buffer;
sysex.dwBufferLength = nBytes;
sysex.dwFlags = 0;
Expand Down

0 comments on commit 611a715

Please sign in to comment.