]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Add strcpy to reduce explicit use of strzone/strunzone
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index a3bb6eb216e8677b4ae7add94f76dbee46188034..d74c4b800568e515760c27bbcb6bc154a75c72ec 100644 (file)
@@ -1199,9 +1199,7 @@ void Maplist_Init()
                error("empty maplist, cannot select a new map");
        Map_Current = bound(0, GetMaplistPosition(), Map_Count - 1);
 
-       if(Map_Current_Name)
-               strunzone(Map_Current_Name);
-       Map_Current_Name = strzone(argv(Map_Current)); // will be automatically freed on exit thanks to DP
+       strcpy(Map_Current_Name, argv(Map_Current)); // will be automatically freed on exit thanks to DP
        // this may or may not be correct, but who cares, in the worst case a map
        // isn't chosen in the first pass that should have been
 }