From: terencehill Date: Mon, 26 Jun 2017 14:07:24 +0000 (+0200) Subject: HUD_Write_PanelCvar: avoid a repeated strcat by not passing strcated string to HUD_Wr... X-Git-Tag: xonotic-v0.8.5~2687 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=73162c17d241e0f046afa1578343180e4fcb940d;p=xonotic%2Fxonotic-data.pk3dir.git HUD_Write_PanelCvar: avoid a repeated strcat by not passing strcated string to HUD_Write_Cvar --- diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index b0c01e655..64b951e96 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -5,12 +5,13 @@ #define HUD_Write(s) fputs(fh, s) #define HUD_Write_Cvar(cvar) HUD_Write(strcat("seta ", cvar, " \"", cvar_string(cvar), "\"\n")) -#define HUD_Write_PanelCvar(cvar_suf) HUD_Write_Cvar(strcat("hud_panel_", panel.panel_name, cvar_suf)) +#define HUD_Write_PanelCvar(cvar_suf) str = strcat("hud_panel_", panel.panel_name, cvar_suf), HUD_Write_Cvar(str) // Save the config void HUD_Panel_ExportCfg(string cfgname) { float fh; string filename = strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg"); + string str = ""; fh = fopen(filename, FILE_WRITE); if(fh >= 0) {