]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix wrong usage of dpsnprintf
authorterencehill <piuntn@gmail.com>
Mon, 30 Sep 2024 22:06:15 +0000 (00:06 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 30 Sep 2024 22:44:13 +0000 (00:44 +0200)
console.c

index c6929ac270fc16a4f1814c5097695448acd91eac..b7866375936eafed443cad2663d15b047c81392a 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1634,9 +1634,9 @@ void Chat_NicksBar_Build(void)
                if (cl.scores[next].name[0])
                {
                        if (next_players_count == 0)
-                               len += dpsnprintf(chat_nicksbarstring, sizeof(chat_nicksbarstring), "%s^8, ...", chat_nicksbarstring);
+                               len += dpsnprintf(chat_nicksbarstring + len, sizeof(chat_nicksbarstring), "%s^8, ...", chat_nicksbarstring);
                        else
-                               len += dpsnprintf(chat_nicksbarstring, sizeof(chat_nicksbarstring), "%s^8, #%d ^7%s", chat_nicksbarstring, next + 1, cl.scores[next].name);
+                               len += dpsnprintf(chat_nicksbarstring + len, sizeof(chat_nicksbarstring), "%s^8, #%d ^7%s", chat_nicksbarstring, next + 1, cl.scores[next].name);
                        --next_players_count;
                }
        }