fix M159 - crash at end of prayer
Fix the crash caused by division by zero (attempt to compute rn2(0)) when deciding prayer boon for a character whose Luck went negative during the course of the prayer. <email deleted> triggered it by killing a shopkeeper with the ongoing damage from a scroll of stinking cloud; his non-chaotic character was branded a murderer and lost two points of Luck after the prayer was already in progress. (Prayers fail when Luck is already negative, so the code to pick a boon expects non-negative values; the fact that is always adds at least +2 leads to me to suspect that someone already realized that luck timeout on Friday 13th could result in Luck of -1 at the end of a successful prayer--that value doesn't trigger this crash.)
This commit is contained in:
@@ -140,6 +140,7 @@ weaken "farming" strategy
|
||||
don't suppress corpse if you kill your own steed
|
||||
fix typo in tourist quest leader's greeting
|
||||
fix grammar for graveyard sounds when polymorphed
|
||||
avoid divide by zero crash if Luck drops below -1 while a prayer is in progress
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
Reference in New Issue
Block a user