summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-15 17:40:12 +0000
committertruelight <truelight@openttd.org>2004-12-15 17:40:12 +0000
commitd7d3ff484940b9c6ceee8f16ace7bc6bd3624bbb (patch)
treebedfbaf2ee41936ee33b31bb6b2a7a11b6799e17
parenta4a3d829be1591bc94829bcf247ce0a5bb11d562 (diff)
downloadopenttd-d7d3ff484940b9c6ceee8f16ace7bc6bd3624bbb.tar.xz
(svn r1102) -Fix: [Console] 'set server_pw' was acting crazy when you typed more
chars then it could take
-rw-r--r--console_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 3f5e892af..53f8c45ab 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -606,7 +606,7 @@ DEF_CONSOLE_CMD(ConSet) {
_network_game_info.server_password[0] = '\0';
_network_game_info.use_password = 0;
} else {
- strncpy(_network_game_info.server_password, argv[2], sizeof(_network_game_info.server_password));
+ ttd_strlcpy(_network_game_info.server_password, argv[2], sizeof(_network_game_info.server_password));
_network_game_info.use_password = 1;
}
IConsolePrintF(_iconsole_color_warning, "Game-password changed to '%s'", _network_game_info.server_password);