Skip to content

Commit

Permalink
- handle empty command names when getting key binds
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Apr 19, 2021
1 parent de03618 commit 4bcea0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/console/c_bind.cpp
Expand Up @@ -460,6 +460,11 @@ int FKeyBindings::GetKeysForCommand (const char *cmd, int *first, int *second)

*first = *second = c = i = 0;

if (cmd[0] == '\0')
{
return 0;
}

while (i < NUM_KEYS && c < 2)
{
if (stricmp (cmd, Binds[i]) == 0)
Expand Down

0 comments on commit 4bcea0a

Please sign in to comment.