(svn r1102) -Fix: [Console] 'set server_pw' was acting crazy when you typed more

chars then it could take
This commit is contained in:
truelight 2004-12-15 17:40:12 +00:00
parent a4a3d829be
commit d7d3ff4849
1 changed files with 1 additions and 1 deletions

View File

@ -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);