From 47657995a5256348fd223891d6f58f3366a59f09 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 26 Nov 2015 14:34:04 +0100 Subject: [PATCH] Another variable for the zoned string isn't needed in this case --- qcsrc/menu/xonotic/hudskinlist.qc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/menu/xonotic/hudskinlist.qc b/qcsrc/menu/xonotic/hudskinlist.qc index aa339fea9d..49a3ecaa33 100644 --- a/qcsrc/menu/xonotic/hudskinlist.qc +++ b/qcsrc/menu/xonotic/hudskinlist.qc @@ -76,7 +76,7 @@ void getAllHUDSkins(entity me, string subdir) s = "*"; s = strcat(subdir, "hud_", s, ".cfg"); float strlen_subdir = strlen(subdir); - string zoned_subdir = strzone(subdir); + subdir = strzone(subdir); float list, i, n; list = search_begin(s, false, true); @@ -86,15 +86,15 @@ void getAllHUDSkins(entity me, string subdir) int bufsize = buf_getsize(me.listHUDSkin); for(i = 0; i < n; ++i) { - bufstr_set(me.listHUDSkin, bufsize + i * HUDSKINPARM_COUNT + HUDSKINPARM_PATH, zoned_subdir); + bufstr_set(me.listHUDSkin, bufsize + i * HUDSKINPARM_COUNT + HUDSKINPARM_PATH, subdir); s = search_getfilename(list, i); // get initial full file name s = substring(s, strlen_subdir + 4, (strlen(s) - strlen_subdir - 4 - 4)); // remove "hud_" prefix and ".cfg" suffix bufstr_set(me.listHUDSkin, bufsize + i * HUDSKINPARM_COUNT + HUDSKINPARM_NAME, s); } search_end(list); } - if(zoned_subdir) - strunzone(zoned_subdir); + if(subdir) + strunzone(subdir); } void XonoticHUDSkinList_getHUDSkins(entity me) -- 2.39.2