Added check for NOTHING key in has_key()

This commit is contained in:
Thomas Arp 2022-11-02 22:31:56 +01:00 committed by GitHub
parent 8f67dd880c
commit 15074b1d93
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);