This commit is contained in:
jl777
2019-03-06 03:03:46 -11:00
parent 891bfb4b9d
commit ab4fde8764
2 changed files with 33 additions and 28 deletions

View File

@@ -290,8 +290,7 @@ attack(struct rogue_state *rs,THING *mp)
} }
when 'N': when 'N':
{ {
register THING *obj, *steal; THING *obj, *steal; int nobj;
register int nobj;
/* /*
* Nymph's steal a magic item, look through the pack * Nymph's steal a magic item, look through the pack
@@ -594,7 +593,6 @@ void
remove_mon(struct rogue_state *rs,coord *mp, THING *tp, bool waskill) remove_mon(struct rogue_state *rs,coord *mp, THING *tp, bool waskill)
{ {
register THING *obj, *nexti; register THING *obj, *nexti;
for (obj = tp->t_pack; obj != NULL; obj = nexti) for (obj = tp->t_pack; obj != NULL; obj = nexti)
{ {
nexti = next(obj); nexti = next(obj);

View File

@@ -61,6 +61,16 @@ discard(THING *item)
break; break;
} }
} }
THING *list = pack;
for (; list != NULL; list = next(list))
{
if ( list == item )
{
fprintf(stderr,"pack item discarded? (%s)\n",inv_name(list,FALSE));
sleep(3);
break;
}
}
#endif #endif
itemcounter--; itemcounter--;
free((char *) item); free((char *) item);
@@ -129,7 +139,6 @@ void
_free_list(THING **ptr) _free_list(THING **ptr)
{ {
THING *item; THING *item;
while (*ptr != NULL) while (*ptr != NULL)
{ {
item = *ptr; item = *ptr;
@@ -138,8 +147,6 @@ _free_list(THING **ptr)
} }
} }
/* /*
* new_item * new_item
* Get a new item with a specified size * Get a new item with a specified size