mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Added check for NOTHING key in has_key()
This commit is contained in:
parent
8f67dd880c
commit
15074b1d93
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue