[Commits] [wesnoth/wesnoth] 8bfc5e: Fix #2117: crash if either combatant was guarantee...

GitHub noreply at github.com
Wed Oct 25 17:06:28 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 8bfc5eb1da8fa0a53c638d8b9f68709554f55987
      https://github.com/wesnoth/wesnoth/commit/8bfc5eb1da8fa0a53c638d8b9f68709554f55987
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2017-10-25 (Wed, 25 Oct 2017)

  Changed paths:
    M src/attack_prediction.cpp

  Log Message:
  -----------
  Fix #2117: crash if either combatant was guaranteed to die

Regression from commit f6c4f3d214f5619ece6b934d0d1003ca2f1020e7.

The code divided by zero and the probability to stay unscathed ended up as
NaN, which triggered an assertion failure if the AI simulated one more
fight for either combatant.





More information about the Commits mailing list