permapoisoned follow-up
otmp can be 0 in mk_artifact. In fact, it is explicitly being set to 0 three lines above the recently added call to permapoisoned(). The static analyzer was griping also.
This commit is contained in:
@@ -301,7 +301,7 @@ mk_artifact(
|
||||
otmp = 0;
|
||||
} /* otherwise, otmp has not changed; just fallthrough to return it */
|
||||
}
|
||||
if (permapoisoned(otmp))
|
||||
if (otmp && permapoisoned(otmp))
|
||||
otmp->opoisoned = 1;
|
||||
return otmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user