Author: cazfi Date: Mon Feb 16 07:53:49 2015 New Revision: 28161 URL: http://svn.gna.org/viewcvs/freeciv?rev=28161&view=rev Log: Made advance_by_number(A_FUTURE) to return valid advance structure. This fixes receiving Future Tech from Darwin's Voyage in multiplayer ruleset.
See bug #23231 Modified: branches/S2_5/common/tech.c Modified: branches/S2_5/common/tech.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/tech.c?rev=28161&r1=28160&r2=28161&view=diff ============================================================================== --- branches/S2_5/common/tech.c (original) +++ branches/S2_5/common/tech.c Mon Feb 16 07:53:49 2015 @@ -98,7 +98,8 @@ **************************************************************************/ struct advance *advance_by_number(const Tech_type_id atype) { - if (atype < 0 || atype >= game.control.num_tech_types) { + if (atype != A_FUTURE + && (atype < 0 || atype >= game.control.num_tech_types)) { /* This isn't an error; some callers depend on it. */ return NULL; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits