analyzer lint for do_wear.c, dothrow.c
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 dothrow.c $NHDT-Date: 1709969638 2024/03/09 07:33:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.285 $ */
|
||||
/* NetHack 3.7 dothrow.c $NHDT-Date: 1737343372 2025/01/19 19:22:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.300 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -252,6 +252,7 @@ throw_obj(struct obj *obj, int shotlimit)
|
||||
gm.m_shot.n = multishot;
|
||||
for (gm.m_shot.i = 1; gm.m_shot.i <= gm.m_shot.n; gm.m_shot.i++) {
|
||||
twoweap = u.twoweap;
|
||||
assert(obj != NULL); /* m_shot.i <= m_shot.n guarantees this */
|
||||
/* split this object off from its slot if necessary */
|
||||
if (obj->quan > 1L) {
|
||||
otmp = splitobj(obj, 1L);
|
||||
@@ -2102,6 +2103,7 @@ thitmonst(
|
||||
if (!next2u)
|
||||
sho_obj_return_to_u(obj);
|
||||
obj = addinv(obj); /* back into your inventory */
|
||||
nhUse(obj);
|
||||
(void) encumber_msg();
|
||||
}
|
||||
return 1; /* caller doesn't need to place it */
|
||||
|
||||
Reference in New Issue
Block a user