(svn r1102) -Fix: [Console] 'set server_pw' was acting crazy when you typed more
authortruelight
Wed, 15 Dec 2004 17:40:12 +0000
changeset 666 8330fb03b6e1
parent 665 c96dc0b4ef98
child 667 0a95b09599ac
(svn r1102) -Fix: [Console] 'set server_pw' was acting crazy when you typed more
chars then it could take
console_cmds.c
--- a/console_cmds.c	Wed Dec 15 17:31:18 2004 +0000
+++ b/console_cmds.c	Wed Dec 15 17:40:12 2004 +0000
@@ -606,7 +606,7 @@
 				_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);