Hmm, can't have variably increased plugin function names if the cmd code uses pointers to the function names. This'll help emulated stuff work better.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@784 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-15 20:50:02 +00:00
parent cd85374a3a
commit 999e637bc1
1 changed files with 3 additions and 2 deletions

View File

@ -1245,8 +1245,9 @@ qboolean Cmd_AddRemCommand (char *cmd_name, xcommand_t function)
}
}
cmd = Z_Malloc (sizeof(cmd_function_t));
cmd->name = cmd_name;
cmd = Z_Malloc (sizeof(cmd_function_t)+strlen(cmd_name)+1);
cmd->name = (char*)(cmd+1);
strcpy(cmd->name, cmd_name);
cmd->function = function;
cmd->next = cmd_functions;
cmd->restriction = 0;