remove obj guard from stone_missile(obj) macro
Checking the callers:
toss_up() would have segfaulted prior to use of stone_missile() if obj were NULL.
thitu() now has a guard prior to use of stone_missile()
ohitmon() would have crashed from earlier dereference otmp->dknown if it were NULL,
otmp arg is declared nonnull
thitm() now has a guard prior to use of stone_missile().
hmon_hitmon_do_hit() null obj takes a different code path than the code path
using stone_missile(); comment asserting that added
This commit is contained in:
@@ -13,7 +13,7 @@ static int throw_ok(struct obj *);
|
||||
static void autoquiver(void);
|
||||
static struct obj *find_launcher(struct obj *);
|
||||
static int gem_accept(struct monst *, struct obj *);
|
||||
static boolean toss_up(struct obj *, boolean);
|
||||
static boolean toss_up(struct obj *, boolean) NONNULLARG1;
|
||||
static void sho_obj_return_to_u(struct obj * obj);
|
||||
static struct obj *return_throw_to_inv(struct obj *, long, boolean,
|
||||
struct obj *);
|
||||
|
||||
Reference in New Issue
Block a user