Ticket #39526

追加モンスターの性質上闘技場の戦闘力計算でゼロ除算が発生する不具合(Division by zero in bldg.c:battle_monsters())

Open Date: 2019-09-01 04:50 Last Update: 2021-01-01 20:19

Reporter:
Owner:
Type:
Status:
Closed
Component:
(None)
Priority:
1 - Lowest
Severity:
3
Resolution:
Fixed
File:
None

Details

Starting a new game, had the game exit on a division by zero exception in battle_monsters() called by player_wipe_without_name(). Modifying the code so battle_monsters() is run repeatedly, there's one type of monster ("wandering one", 1d1 hit dice, level 0) that can be added to the arena and has a calculated power of zero. That leads to a division by zero at the line,

                        power[i] = total*60/power[i];

Ticket History (3/4 Histories)

2019-09-01 04:50 Updated by: backwardseric
  • New Ticket "Division by zero in bldg.c:battle_monsters()" created
2019-09-11 00:30 Updated by: deskull
2021-01-01 20:19 Updated by: deskull

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login