]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
Lots of str[n]cat, str[n]cpy, and [v]sprintf have been replaced by strlcat, strlcpy...
[xonotic/darkplaces.git] / sv_main.c
index 8f4eb831c2eedfb97d80fa04d97f89511668e0fc..ac6368249cca465938f4f9b4cb49f219079259cc 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1370,7 +1370,7 @@ void SV_UpdateToReliableMessages (void)
                        if (s == NULL)
                                s = "";
                        // point the string back at host_client->name to keep it safe
                        if (s == NULL)
                                s = "";
                        // point the string back at host_client->name to keep it safe
-                       strncpy(host_client->name, s, sizeof(host_client->name) - 1);
+                       strlcpy (host_client->name, s, sizeof (host_client->name));
                        sv_player->v->netname = PR_SetString(host_client->name);
                }
                if ((val = GETEDICTFIELDVALUE(sv_player, eval_clientcolors)) && host_client->colors != val->_float)
                        sv_player->v->netname = PR_SetString(host_client->name);
                }
                if ((val = GETEDICTFIELDVALUE(sv_player, eval_clientcolors)) && host_client->colors != val->_float)