Fix two mistakes in r5176 (static string cleanup) that made us copy far
less from two strings than we should. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5233 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
504ffcc625
commit
a05859644a
|
@ -406,7 +406,7 @@ static void NETsendGAMESTRUCT(TCPsocket socket, const GAMESTRUCT* game)
|
|||
|
||||
// Now dump the data into the buffer
|
||||
// Copy a string
|
||||
sstrcpy(buffer, game->name);
|
||||
strlcpy(buffer, game->name, sizeof(game->name));
|
||||
buffer += sizeof(game->name);
|
||||
|
||||
// Copy 32bit large big endian numbers
|
||||
|
@ -416,7 +416,7 @@ static void NETsendGAMESTRUCT(TCPsocket socket, const GAMESTRUCT* game)
|
|||
buffer += sizeof(int32_t);
|
||||
|
||||
// Copy yet another string
|
||||
sstrcpy(buffer, game->desc.host);
|
||||
strlcpy(buffer, game->desc.host, sizeof(game->desc.host));
|
||||
buffer += sizeof(game->desc.host);
|
||||
|
||||
// Copy 32bit large big endian numbers
|
||||
|
|
Loading…
Reference in New Issue