From aaf324bcb4478caf1e9751d205f80637ea8b67c3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2024 16:29:45 -0500 Subject: [PATCH] comment bit in polyself.c --- src/polyself.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/polyself.c b/src/polyself.c index 736c62dff..55da8a8d5 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1128,6 +1128,15 @@ dropp(struct obj *obj) for (otmp = gi.invent; otmp; otmp = otmp->nobj) { if (otmp == obj) { dropx(obj); + /* Note that otmp->nobj is pointing at fobj now, + * as a result of: + * dropx() -> dropy() -> dropz() -> place_object(), + * and no longer pointing at the next obj in inventory. + * That would be an issue if this loop were allowed + * to continue, but the break statement that + * follows prevents the loop from continuing on with + * objects on the floor. + */ break; } }