Merge pull request #113 from tbamud/zusuk-patch-1

Added check for NOTHING key in has_key()
This commit is contained in:
Thomas Arp 2022-11-05 12:53:05 +01:00 committed by GitHub
commit a745935421
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);