mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Fixed a bug with aliases and updated cb.gib a bit.
This commit is contained in:
parent
b8216807fe
commit
19ac57dafc
2 changed files with 7 additions and 4 deletions
|
@ -56,7 +56,7 @@ custom.load.menu_f = {
|
|||
custom.menu.${custom.menu.size}.size = 0
|
||||
function "__menu" $2
|
||||
__menu
|
||||
custom.menu.size = (${custom.menu.size} + 1)
|
||||
custom.menu.size++
|
||||
}
|
||||
|
||||
custom.load.item_f = {
|
||||
|
@ -68,7 +68,7 @@ custom.load.item_f = {
|
|||
custom.item.$1 = 1
|
||||
custom.item.$1.menu = $i
|
||||
custom.item.$1.number = $n
|
||||
custom.menu.$i.size = ($n + 1)
|
||||
custom.menu.$i.size++
|
||||
}
|
||||
|
||||
custom.load.buy_f = {
|
||||
|
|
|
@ -350,7 +350,7 @@ Cmd_Alias_f (void)
|
|||
}
|
||||
if (alias)
|
||||
free ((char *) alias->value);
|
||||
else {
|
||||
else if (!Cmd_Exists (s)) {
|
||||
cmdalias_t **a;
|
||||
|
||||
alias = calloc (1, sizeof (cmdalias_t));
|
||||
|
@ -362,7 +362,10 @@ Cmd_Alias_f (void)
|
|||
break;
|
||||
alias->next = *a;
|
||||
*a = alias;
|
||||
Cmd_AddCommand (alias->name, Cmd_Runalias_f, "User-created command.");
|
||||
Cmd_AddCommand (alias->name, Cmd_Runalias_f, "Alias command.");
|
||||
} else {
|
||||
Sys_Printf ("alias: a command with the name \"%s\" already exists.\n", s);
|
||||
return;
|
||||
}
|
||||
// copy the rest of the command line
|
||||
cmd = malloc (strlen (Cmd_Args (1)) + 2); // can never be longer
|
||||
|
|
Loading…
Reference in a new issue