summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 7f5c2224c..dbade4c10 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -990,7 +990,7 @@ void itemdb_read_packages(void) {
c = 0;
while( (it = libconfig->setting_get_elem(itg,c++)) ) {
int rval = 0;
- if( ( t = libconfig->setting_get_member(it, "Random")) && ( rval = libconfig->setting_get_int(t) ) > 0 ) {
+ if ((t = libconfig->setting_get_member(it, "Random")) != NULL && (rval = libconfig->setting_get_int(t)) > 0) {
rgroups[i - 1][rval - 1] += 1;
}
}