URL:
  <http://gna.org/bugs/?20239>

                 Summary: Division by zero in defense_bonus() for 0 value
cityspot
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Sat 13 Oct 2012 05:25:06 AM EEST
                Category: ai
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.3.3, 2.4.0, 2.5.0

    _______________________________________________________

Details:

aisettler.c:defense_bonus():587 contains division by result->total, and that
can be zero (happened with civ1 ruleset to me)

Fix attached



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 13 Oct 2012 05:25:06 AM EEST  Name: ZeroToOneResult.patch  Size:
563B   By: cazfi

<http://gna.org/bugs/download.php?file_id=16690>
-------------------------------------------------------
Date: Sat 13 Oct 2012 05:25:06 AM EEST  Name: ZeroToOneResult-S2_3.patch 
Size: 531B   By: cazfi

<http://gna.org/bugs/download.php?file_id=16691>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20239>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to