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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user