]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/wall.qc
Add strcpy to reduce explicit use of strzone/strunzone
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / wall.qc
index b5728095485406213273f68f387c6096761de206..d847e50ae7123dd0713c1417202fbea345b2c5de 100644 (file)
@@ -186,17 +186,15 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                        this.mins = this.maxs = '0 0 0';
                setsize(this, this.mins, this.maxs);
 
-               if(this.bgmscript)
-                       strunzone(this.bgmscript);
-               this.bgmscript = ReadString();
-               if(substring(this.bgmscript, 0, 1) == "<")
+               string s = ReadString();
+               if(substring(s, 0, 1) == "<")
                {
-                       this.bgmscript = strzone(substring(this.bgmscript, 1, -1));
+                       strcpy(this.bgmscript, substring(s, 1, -1));
                        this.bgmscriptangular = 1;
                }
                else
                {
-                       this.bgmscript = strzone(this.bgmscript);
+                       strcpy(this.bgmscript, s);
                        this.bgmscriptangular = 0;
                }
                if(this.bgmscript != "")