summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-05 18:27:57 +0000
committerrubidium <rubidium@openttd.org>2008-05-05 18:27:57 +0000
commitf200fc3b995e780174e034587e77ba6f01884f80 (patch)
tree215c6573bc8d0bbf377931616ac13efcf43bd26b /src/network
parent0eab2c07c29d3544f3802a74a09a7b1f6c136a68 (diff)
downloadopenttd-f200fc3b995e780174e034587e77ba6f01884f80.tar.xz
(svn r12957) -Codechange: do not misuse snprintf when you just want to copy a string, also use DEBUG instead of fprintf in one case.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index eb129ffe1..3516baa9f 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -82,10 +82,10 @@ void HashCurrentCompanyPassword()
if (StrEmpty(_network_player_info[_local_player].password)) return;
_password_game_seed = _patches.generation_seed;
- snprintf(_password_server_unique_id, sizeof(_password_server_unique_id), _network_unique_id);
+ ttd_strlcpy(_password_server_unique_id, _network_unique_id, sizeof(_password_server_unique_id));
const char *new_pw = GenerateCompanyPasswordHash(_network_player_info[_local_player].password);
- snprintf(_network_player_info[_local_player].password, sizeof(_network_player_info[_local_player].password), new_pw);
+ ttd_strlcpy(_network_player_info[_local_player].password, new_pw, sizeof(_network_player_info[_local_player].password));
}