Fix check_autopickup_exceptions to return null pointer if no exception is found
This commit is contained in:
@@ -722,9 +722,9 @@ struct obj *obj;
|
|||||||
*ape = iflags.autopickup_exceptions;
|
*ape = iflags.autopickup_exceptions;
|
||||||
if (ape) {
|
if (ape) {
|
||||||
char *objdesc = makesingular(doname(obj));
|
char *objdesc = makesingular(doname(obj));
|
||||||
do if (regex_match(objdesc, ape->regex)) return ape;
|
while (ape && !regex_match(objdesc, ape->regex)) ape = ape->next;
|
||||||
while (ape = ape->next);
|
|
||||||
}
|
}
|
||||||
|
return ape;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user