always null-terminate limited-length strings

This commit is contained in:
Martin Michelsen
2022-03-31 10:04:37 -07:00
parent f39dd5a0af
commit 832135a505
6 changed files with 40 additions and 38 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ ServerState::ServerState()
(is_ep3_only ? LobbyFlag::EPISODE_3 : 0);
l->block = x + 1;
l->type = x;
char16ncpy(l->name, lobby_name.c_str(), 0x24);
strcpy_z(l->name, lobby_name.c_str(), 0x24);
l->max_clients = 12;
this->add_lobby(l);