Prevent out-of-bounds array access

Fixes https://github.com/itgmania/itgmania/issues/27
This commit is contained in:
Martin Natano
2022-06-27 20:10:52 +02:00
parent 9b348090a7
commit 61f12e8165
2 changed files with 9 additions and 2 deletions
@@ -450,7 +450,7 @@ wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool b
{
CGEventRef event = CGEventCreate(nullptr);
CGEventFlags mods = CGEventGetFlags(event);
CFRelease(event);
CFRelease(event);
UInt32 nModifiers = bUseCurrentKeyModifiers ? (UInt32)mods : 0;
wchar_t sCharCode = KeyCodeToChar( iMacVirtualKey, nModifiers );
if( sCharCode != 0 )