[Freeciv-Dev] (PR#13778) [Patch] Fix to ai_select_tech() crash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13778 >
ai_select_tech() sometimes sets want for all available techs to zero
(this is somewhat suspicios in itself). As a result, it returns A_UNSET
as wanted tech.
Fix attached.
- ML
diff -Nurd -X.diff_ignore freeciv/ai/aitech.c freeciv/ai/aitech.c
--- freeciv/ai/aitech.c 2005-08-25 18:55:33.625000000 +0300
+++ freeciv/ai/aitech.c 2005-08-25 18:58:57.421875000 +0300
@@ -64,6 +64,8 @@
memset(values, 0, sizeof(values));
memset(goal_values, 0, sizeof(goal_values));
+ values[A_UNSET] = -1;
+ goal_values[A_UNSET] = -1;
/* Fill in values for the techs: want of the tech
* + average want of those we will discover en route */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#13778) [Patch] Fix to ai_select_tech() crash,
Marko Lindqvist <=
|
|