diff options
Diffstat (limited to 'src/console.cpp')
-rw-r--r-- | src/console.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/console.cpp b/src/console.cpp index 222bed024..e5d5ae962 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -261,6 +261,11 @@ IConsoleCmd *IConsoleCmdGet(const char *name) */ void IConsoleAliasRegister(const char *name, const char *cmd) { + if (IConsoleAliasGet(name) != NULL) { + IConsoleError("an alias with this name already exists; insertion aborted"); + return; + } + char *new_alias = strdup(name); char *cmd_aliased = strdup(cmd); IConsoleAlias *item_new = MallocT<IConsoleAlias>(1); |