Added check for NOTHING key in has_key()
This commit is contained in:
@@ -461,6 +461,9 @@ int has_key(struct char_data *ch, obj_vnum key)
|
|||||||
{
|
{
|
||||||
struct obj_data *o;
|
struct obj_data *o;
|
||||||
|
|
||||||
|
if (key == NOTHING)
|
||||||
|
return (0);
|
||||||
|
|
||||||
for (o = ch->carrying; o; o = o->next_content)
|
for (o = ch->carrying; o; o = o->next_content)
|
||||||
if (GET_OBJ_VNUM(o) == key)
|
if (GET_OBJ_VNUM(o) == key)
|
||||||
return (1);
|
return (1);
|
||||||
|
|||||||
Reference in New Issue
Block a user