]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use strcpy for centerprint title
authorz411 <z411@omaera.org>
Mon, 4 Apr 2022 20:00:25 +0000 (16:00 -0400)
committerz411 <z411@omaera.org>
Mon, 4 Apr 2022 20:00:25 +0000 (16:00 -0400)
qcsrc/client/hud/panel/centerprint.qc

index 1cd22b49366baa71bd87227dd76dc9508f2dcf35..307e3c899a52504a30b464dfcd5c3ee45ff70308 100644 (file)
@@ -159,10 +159,7 @@ void centerprint_ClearTitle()
 void centerprint_SetTitle(string title, float offset)
 {
        if(title != centerprint_title) {
-               if(centerprint_title)
-                       strfree(centerprint_title);
-
-               centerprint_title = strzone(CCR(title));
+               strcpy(centerprint_title, CCR(title));
                centerprint_title_offset = offset;
        }
 }