Skip to content

Commit

Permalink
Update Interface.cpp (#2367)
Browse files Browse the repository at this point in the history
  • Loading branch information
EndangeredNayla committed Jun 2, 2023
1 parent f4459fe commit 18a712c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/nragev20/Interface.cpp
Expand Up @@ -3524,7 +3524,7 @@ bool GetButtonText( const BUTTON& btnButton, LPTSTR Buffer )
DWORD ScanKeyboard( LPDEVICE lpDevice, LPDWORD lpdwCounter, LPBUTTON pButton )
{
HRESULT hr;
BYTE cKeys[256];
BYTE cKeys[256] = {0};

hr = lpDevice->didHandle->GetDeviceState( sizeof( cKeys ), (LPVOID)&cKeys );
if ( FAILED(hr) )
Expand All @@ -3534,9 +3534,8 @@ DWORD ScanKeyboard( LPDEVICE lpDevice, LPDWORD lpdwCounter, LPBUTTON pButton )
}

int iGotKey = FALSE;
int i = 0;

for( i = 0; i < ARRAYSIZE( cKeys ); ++i )
for( int i = 1; i < ARRAYSIZE( cKeys ); ++i )
{
if (( cKeys[i] & 0x80 ) )
{
Expand Down

0 comments on commit 18a712c

Please sign in to comment.