]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make APPEND_STRING behave "sane".
authorRudolf Polzer <divverent@xonotic.org>
Sun, 13 Oct 2013 00:04:58 +0000 (02:04 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 13 Oct 2013 00:04:58 +0000 (02:04 +0200)
qcsrc/menu/xonotic/util.qc

index 356b92d3812a4327d82608df71fd567cdff6b8e5..3f651727cff1e7121e8e41380232428c611b075e 100644 (file)
@@ -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;
                        }
                }