mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-21 21:40:49 +02:00
Merge pull request #113 from tbamud/zusuk-patch-1
Added check for NOTHING key in has_key()
This commit is contained in:
commit
a745935421
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;
|
||||
|
||||
if (key == NOTHING)
|
||||
return (0);
|
||||
|
||||
for (o = ch->carrying; o; o = o->next_content)
|
||||
if (GET_OBJ_VNUM(o) == key)
|
||||
return (1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue