]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a warning for notifications that would be broken by broken varargs
authorSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 01:34:53 +0000 (20:34 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 01:34:53 +0000 (20:34 -0500)
qcsrc/common/notifications.qh

index 6b0c5f40cdda66502a3ec6818507c7af7e04d6fc..c9b2cfe4f6ec7084f3aa7f351f2dc3271e15575f 100644 (file)
@@ -1007,6 +1007,7 @@ string Process_Notif_Args(float arg_type, string args, string notiftype, string
                \
                notif.nent_stringcount = strnum; \
                notif.nent_floatcount = flnum; \
+               if(strnum + flnum > 4) { print(sprintf("^1NOTIFICATION HAS TOO MANY ARGUMENTS WITH BROKEN VARARGS: ^7net_type = MSG_%s, net_name = %s\n", strtoupper(#type), #name)); } \
                if(strnum + flnum) \
                { \
                        if(args != "") { notif.nent_args = strzone(Process_Notif_Args(1, args, strtoupper(#type), #name)); } \