Magic-number elimination and fix

More test coverage for some of the cases
This commit is contained in:
NHOrus 2017-07-06 17:55:56 +03:00
parent da6a090b83
commit ca7ac4063f
6 changed files with 3414 additions and 7 deletions

3
misc.c
View file

@ -607,7 +607,8 @@ void drop(obj_t object, loc_t where)
--game.holdng;
game.place[object] = where;
}
if (where <= 0)
if (where == LOC_NOWHERE ||
where == CARRIED)
return;
game.link[object] = game.atloc[where];
game.atloc[where] = object;