[Freeciv-Dev] (PR#11806) bug in required_tech_helper
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#11806) bug in required_tech_helper |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Wed, 5 Jan 2005 11:28:19 -0800 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11806 >
Since it's no longer true that player(pplayer, A_NONE)==TECH_KNOWN ( I don't
known why)
the following if statement from build_required_techs_helper() not always
returns for A_NONE
if (!tech_is_available(pplayer, tech)
|| get_invention(pplayer, tech) == TECH_KNOWN
|| is_tech_a_req_for_goal(pplayer, tech, goal)) {
return;
}
This bug triggers following assertion, because A_NONE requires A_NONE
if (advances[tech].req[0] == goal || advances[tech].req[1] == goal) {
/* TRANS: Obscure ruleset error */
freelog(LOG_FATAL, _("tech \"%s\": requires itself"),
get_tech_name(pplayer, goal));
assert(0);
exit(EXIT_FAILURE);
}
Index: common/tech.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v
retrieving revision 1.76.2.2
diff -u -r1.76.2.2 tech.c
--- common/tech.c 9 Dec 2004 02:09:51 -0000 1.76.2.2
+++ common/tech.c 5 Jan 2005 19:21:46 -0000
@@ -101,7 +101,8 @@
* already marked */
if (!tech_is_available(pplayer, tech)
|| get_invention(pplayer, tech) == TECH_KNOWN
- || is_tech_a_req_for_goal(pplayer, tech, goal)) {
+ || is_tech_a_req_for_goal(pplayer, tech, goal)
+ || tech == A_NONE) {
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11806) bug in required_tech_helper,
Mateusz Stefek <=
|
|