From: Rudolf Polzer Date: Sun, 13 Oct 2013 00:04:58 +0000 (+0200) Subject: Make APPEND_STRING behave "sane". X-Git-Tag: xonotic-v0.8.0~256^2~7 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=70e0d865a18b0a9fee8650db3184b97fa48b06e8;hp=88242c8252052ecab6efe8b20e128b2b4f649161;p=xonotic%2Fxonotic-data.pk3dir.git Make APPEND_STRING behave "sane". --- diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 356b92d38..3f651727c 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -332,7 +332,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) switch(substring(argv(i), 0, 1)) { - #define APPEND_STRING(list,sep,add) list = ((list != "") ? strcat(list, sep, add) : add); + #define APPEND_TO_STRING(list,sep,add) ((list) = (((list) != "") ? strcat(list, sep, add) : (add))) case "V": { un_version = s; @@ -350,23 +350,23 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) } case "B": { - APPEND_STRING(un_bannedservers, " ", s) + APPEND_TO_STRING(un_bannedservers, " ", s); break; } case "E": { if(cvar("menu_updatecheck_getpacks")) - { APPEND_STRING(un_emergency_pk3s, " ", s) } + APPEND_TO_STRING(un_emergency_pk3s, " ", s); break; } case "P": { - APPEND_STRING(un_promoted, " ", s) + APPEND_TO_STRING(un_promoted, " ", s); break; } case "R": { - APPEND_STRING(un_recommended, " ", s) + APPEND_TO_STRING(un_recommended, " ", s); break; } }