summaryrefslogtreecommitdiff
path: root/src/console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/console.cpp')
-rw-r--r--src/console.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/console.cpp b/src/console.cpp
index 2274da64f..511019281 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -105,7 +105,7 @@ void IConsolePrint(TextColour colour_code, const char *string)
/* Create a copy of the string, strip if of colours and invalid
* characters and (when applicable) assign it to the console buffer */
- str = strdup(string);
+ str = stredup(string);
str_strip_colours(str);
str_validate(str, str + strlen(str));
@@ -256,7 +256,7 @@ char *RemoveUnderscores(char *name)
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc, IConsoleHook *hook)
{
IConsoleCmd *item_new = MallocT<IConsoleCmd>(1);
- item_new->name = RemoveUnderscores(strdup(name));
+ item_new->name = RemoveUnderscores(stredup(name));
item_new->next = NULL;
item_new->proc = proc;
item_new->hook = hook;
@@ -291,8 +291,8 @@ void IConsoleAliasRegister(const char *name, const char *cmd)
return;
}
- char *new_alias = RemoveUnderscores(strdup(name));
- char *cmd_aliased = strdup(cmd);
+ char *new_alias = RemoveUnderscores(stredup(name));
+ char *cmd_aliased = stredup(cmd);
IConsoleAlias *item_new = MallocT<IConsoleAlias>(1);
item_new->next = NULL;