Fixed a problem where bad actions (MenuUp instead of Menu-Up) crashed
during initKeyConfig. The action-listener table needs to be null-terminated. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1166 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Changes towards version 0.3:
|
||||
- Action names are properly null-terminated, stops a crash for some
|
||||
bad keys.cfg types -Michael
|
||||
- added '--addon <addon>' - SvdB
|
||||
- keys.cfg from incompatible control scheme version is now renamed
|
||||
automatically to keys.old -Mika
|
||||
|
||||
@@ -73,7 +73,8 @@ static VControl_NameBinding control_names[] = {
|
||||
{ "Pause", (int *)&ImmediateInputState.pause },
|
||||
{ "Exit", (int *)&ImmediateInputState.exit },
|
||||
{ "Abort", (int *)&ImmediateInputState.abort },
|
||||
{ "Debug", (int *)&ImmediateInputState.debug }};
|
||||
{ "Debug", (int *)&ImmediateInputState.debug },
|
||||
{ "Illegal", NULL}};
|
||||
|
||||
|
||||
static void
|
||||
|
||||
@@ -1075,13 +1075,13 @@ _consume_idname (parse_state *state)
|
||||
state->token[index] = 0; /* remove trailing colon */
|
||||
|
||||
result = _name2target (state->token);
|
||||
_next_token (state);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
fprintf (stderr, "VControl: Illegal command type '%s' on config file line %d\n", state->token, state->linenum);
|
||||
state->error = 1;
|
||||
}
|
||||
_next_token (state);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user