Revert "fix crash on NULL gi.invent"
This reverts commit 378648bd9c.
The problem was triggered by marking the 'objlist' argument in
merge_choice() prototype with __attribute__((nonnull)) when it
shouldn't have been, then a followup which relied on that. The
'objlist' argument might be Null. Instead of passing its address to
force it to be non-Null, remove the attribute.
This commit is contained in:
+1
-1
@@ -3885,7 +3885,7 @@ wizkit_addinv(struct obj *obj)
|
||||
obj->bknown = 1; /* ok to bypass set_bknown() */
|
||||
/* same criteria as lift_object()'s check for available inventory slot */
|
||||
if (obj->oclass != COIN_CLASS && inv_cnt(FALSE) >= invlet_basic
|
||||
&& !merge_choice(&gi.invent, obj)) {
|
||||
&& !merge_choice(gi.invent, obj)) {
|
||||
/* inventory overflow; can't just place & stack object since
|
||||
hero isn't in position yet, so schedule for arrival later */
|
||||
add_to_migration(obj);
|
||||
|
||||
Reference in New Issue
Block a user