From: PatR Date: Fri, 29 Apr 2016 08:39:03 +0000 (-0700) Subject: glob tweak X-Git-Tag: NetHack-3.6.1_RC01~805 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9e92fc179644dcb6e042cb446d1504bec461bf0;p=nethack glob tweak Sometime back I oversimplified this bit of code to the point where the impossible(), if ever triggered, would have been followed by a crash. --- diff --git a/src/mkobj.c b/src/mkobj.c index 3574eaece..301fa847d 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -2587,9 +2587,10 @@ struct obj * obj_nexto(otmp) struct obj *otmp; { - if (!otmp) + if (!otmp) { impossible("obj_nexto: wasn't given an object to check"); - + return (struct obj *) 0; + } return obj_nexto_xy(otmp, otmp->ox, otmp->oy, TRUE); }