diff options
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 90f635d60..0756f7266 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -717,14 +717,14 @@ DEF_CONSOLE_CMD(ConClientNickChange) return true; } - char *client_name = argv[2]; + std::string client_name(argv[2]); StrTrimInPlace(client_name); if (!NetworkIsValidClientName(client_name)) { IConsoleError("Cannot give a client an empty name"); return true; } - if (!NetworkServerChangeClientName(client_id, client_name)) { + if (!NetworkServerChangeClientName(client_id, client_name.c_str())) { IConsoleError("Cannot give a client a duplicate name"); } |