diff options
author | truelight <truelight@openttd.org> | 2004-12-15 17:40:12 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-15 17:40:12 +0000 |
commit | 7560705a677bf6e91f5f4acd80868ea1a73708eb (patch) | |
tree | bedfbaf2ee41936ee33b31bb6b2a7a11b6799e17 | |
parent | eb5b1ae72f8c32d99df389e95a92ea1f10a75418 (diff) | |
download | openttd-7560705a677bf6e91f5f4acd80868ea1a73708eb.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.c | 2 |
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); |