Fixed potential b/o in vcontrol keyboard handler
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2529 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -749,12 +749,20 @@ VControl_RemoveAllBindings ()
|
|||||||
void
|
void
|
||||||
VControl_ProcessKeyDown (SDLKey symbol)
|
VControl_ProcessKeyDown (SDLKey symbol)
|
||||||
{
|
{
|
||||||
|
if ((symbol < 0) || (symbol >= SDLK_LAST)) {
|
||||||
|
log_add (log_Warning, "VControl: Got unknown key index %d", symbol);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
activate (bindings[symbol]);
|
activate (bindings[symbol]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VControl_ProcessKeyUp (SDLKey symbol)
|
VControl_ProcessKeyUp (SDLKey symbol)
|
||||||
{
|
{
|
||||||
|
if ((symbol < 0) || (symbol >= SDLK_LAST))
|
||||||
|
return;
|
||||||
|
|
||||||
deactivate (bindings[symbol]);
|
deactivate (bindings[symbol]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user