From: Mario Date: Wed, 10 Oct 2018 10:48:52 +0000 (+1000) Subject: Fix a potential crash in Weapons_fromstr (WEP_Null is expected, not NULL) X-Git-Tag: xonotic-v0.8.5~1786 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0fce1c9a53f02bb4ec3172cdf0fdd6e907aa87c7;p=xonotic%2Fxonotic-data.pk3dir.git Fix a potential crash in Weapons_fromstr (WEP_Null is expected, not NULL) --- diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 9b4c0b468..9a32b4277 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -130,7 +130,7 @@ REGISTER_WEAPON(Null, NEW(Weapon)); Weapon Weapons_fromstr(string s) { FOREACH(Weapons, it != WEP_Null && it.netname == s, return it); - return NULL; + return WEP_Null; }