Fix check_autopickup_exceptions to return null pointer if no exception is found

This commit is contained in:
HMM
2019-09-27 15:17:53 -04:00
parent 234e5f38f2
commit f68561fbe1

View File

@@ -722,9 +722,9 @@ struct obj *obj;
*ape = iflags.autopickup_exceptions;
if (ape) {
char *objdesc = makesingular(doname(obj));
do if (regex_match(objdesc, ape->regex)) return ape;
while (ape = ape->next);
while (ape && !regex_match(objdesc, ape->regex)) ape = ape->next;
}
return ape;
}
boolean