mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Added check for unbound key
This commit is contained in:
parent
1f58595033
commit
b09bcb90a3
|
@ -194,7 +194,15 @@ void CBinds::ConBindPrint(IConsole::IResult *pResult, void *pUserData)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
str_format(aBuf, sizeof(aBuf), "bind %s (%d) = %s", pKeyName, id, pBinds->m_aaKeyBindings[id]);
|
|
||||||
|
if (pBinds->m_aaKeyBindings[id][0] == '\0')
|
||||||
|
{
|
||||||
|
str_format(aBuf, sizeof(aBuf), "%s (%d) is not bound", pKeyName, id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
str_format(aBuf, sizeof(aBuf), "%s (%d) = %s", pKeyName, id, pBinds->m_aaKeyBindings[id]);
|
||||||
|
}
|
||||||
|
|
||||||
pBinds->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
|
pBinds->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue