Changeset - r14905:b3c3b22637cc
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-03-24 11:20:30
yexo@openttd.org
(svn r19512) -Fix (r19511): using the 'alias' console command it's possible to create a duplicate alias name
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/console.cpp
Show inline comments
 
@@ -261,6 +261,11 @@ IConsoleCmd *IConsoleCmdGet(const char *
 
 */
 
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);
0 comments (0 inline, 0 general)