From: Samual Lenks Date: Tue, 26 Feb 2013 01:34:53 +0000 (-0500) Subject: Add a warning for notifications that would be broken by broken varargs X-Git-Tag: xonotic-v0.7.0~62^2~23^2~110 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d85e9685c3677214e4fac41dd1839d9f0a1f9c7b;p=xonotic%2Fxonotic-data.pk3dir.git Add a warning for notifications that would be broken by broken varargs --- diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 6b0c5f40c..c9b2cfe4f 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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)); } \