remove unnecessary null-check on gold_detect()

`sobj` here is always non-null, otherwise it leads segv at earlier code.
This commit is contained in:
SHIRAKATA Kentaro
2023-12-13 15:52:51 +09:00
parent 2413ac2be7
commit 190d840d2a
-2
View File
@@ -367,7 +367,6 @@ gold_detect(struct obj *sobj)
if (!gk.known) {
/* no gold found on floor or monster's inventory.
adjust message if you have gold in your inventory */
if (sobj) {
char buf[BUFSZ];
if (gy.youmonst.data == &mons[PM_GOLD_GOLEM])
@@ -386,7 +385,6 @@ gold_detect(struct obj *sobj)
Strcpy(buf, "You feel materially poor.");
strange_feeling(sobj, buf);
}
return 1;
}
/* only under me - no separate display required */