projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fc1af0
)
Fix a potential crash in Weapons_fromstr (WEP_Null is expected, not NULL)
author
Mario <mario@smbclan.net>
Wed, 10 Oct 2018 10:48:52 +0000
(20:48 +1000)
committer
Mario <mario@smbclan.net>
Wed, 10 Oct 2018 10:48:52 +0000
(20:48 +1000)
qcsrc/common/weapons/all.qh
patch
|
blob
|
history
diff --git
a/qcsrc/common/weapons/all.qh
b/qcsrc/common/weapons/all.qh
index
9b4c0b4
..
9a32b42
100644
(file)
--- 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
;
}