mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 04:29:09 +00:00
(svn r12957) -Codechange: do not misuse snprintf when you just want to copy a string, also use DEBUG instead of fprintf in one case.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user