Fix a potential crash in Weapons_fromstr (WEP_Null is expected, not NULL)
authorMario <mario@smbclan.net>
Wed, 10 Oct 2018 10:48:52 +0000 (20:48 +1000)
committerMario <mario@smbclan.net>
Wed, 10 Oct 2018 10:48:52 +0000 (20:48 +1000)
qcsrc/common/weapons/all.qh

index 9b4c0b4..9a32b42 100644 (file)
@@ -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;
 }