Summary: Server crash when city has more trade routes than
current max
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Mon 16 Sep 2013 09:55:47 PM EEST
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.5.0, 2.6.0



base_handle_unit_establish_trade() checks only if city already has trade
routes equal number to current max of trade routes to establish, and replaces
one of the old ones if it has. Having *more* than current max traderoutes is
handled like having them less than max. More than max traderoutes is a legal
situation max applies to establishing traderoutes only - if max gets lower, no
existing traderoutes are removed.

I got the crash in classic ruleset autogame. I think the city with max
traderoutes established had changed hands to someone with less traderoute
enabling techs, and then on new traderoutes were established without replacing
old one until their count exceeded hard limit of MAX_TRADE_ROUTES.

Fix attached


File Attachments:

Date: Mon 16 Sep 2013 09:55:47 PM EEST  Name: OverbookedRoutes.patch  Size:
2kB   By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to