fixed dump_binds command (#806)

This commit is contained in:
Tom Adams 2010-05-30 00:15:26 +00:00
parent baa57830ad
commit 659d66104e

View file

@ -169,11 +169,13 @@ void CBinds::ConUnbindAll(IConsole::IResult *pResult, void *pUserData)
void CBinds::ConDumpBinds(IConsole::IResult *pResult, void *pUserData) void CBinds::ConDumpBinds(IConsole::IResult *pResult, void *pUserData)
{ {
CBinds *pBinds = (CBinds *)pUserData; CBinds *pBinds = (CBinds *)pUserData;
char aBuf[1024];
for(int i = 0; i < KEY_LAST; i++) for(int i = 0; i < KEY_LAST; i++)
{ {
if(pBinds->m_aaKeyBindings[i][0] == 0) if(pBinds->m_aaKeyBindings[i][0] == 0)
continue; continue;
dbg_msg("binds", "%s (%d) = %s", pBinds->Input()->KeyName(i), i, pBinds->m_aaKeyBindings[i]); str_format(aBuf, sizeof(aBuf), "[binds] %s (%d) = %s", pBinds->Input()->KeyName(i), i, pBinds->m_aaKeyBindings[i]);
pBinds->Console()->Print(aBuf);
} }
} }