]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 9b4c0b46814308dfb037375345a6100c14d444f4..9a32b4277839b32ddfdcb8368747615387556f06 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;
 }