Merge pull request #36 from hexwab/midimacrofix
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 8 Sep 2014 11:04:31 +0000 (21:04 +1000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 8 Sep 2014 11:04:31 +0000 (21:04 +1000)
Add missing argument parenthesis on the MIDI_EVENT() macro.

LUFA/Drivers/USB/Class/Common/MIDIClassCommon.h

index f52013c..b6f6034 100644 (file)
                 *
                 *  \return Constructed MIDI event ID.
                 */
-               #define MIDI_EVENT(virtualcable, command)  ((virtualcable << 4) | (command >> 4))
+               #define MIDI_EVENT(virtualcable, command)  (((virtualcable) << 4) | ((command) >> 4))
 
        /* Enums: */
                /** Enum for the possible MIDI jack types in a MIDI device jack descriptor. */