[Freeciv-Dev] (PR#12046) apply_result_on_server: Assertion `0' failed.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12046 >
Looks like a real bug. We try to apply the result even if it isn't valid.
Patch is for 2.0, it probably applies to the dev branch also.
-jason
? patch.diff
? win32.diff
Index: client/agents/cma_core.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v
retrieving revision 1.64.2.2
diff -u -r1.64.2.2 cma_core.c
--- client/agents/cma_core.c 15 Dec 2004 00:15:43 -0000 1.64.2.2
+++ client/agents/cma_core.c 30 Jan 2005 17:46:22 -0000
@@ -198,6 +198,7 @@
struct cm_result current_state;
bool success;
+ assert(result->found_a_valid);
get_current_as_result(pcity, ¤t_state);
if (results_are_equal(pcity, result, ¤t_state)
@@ -502,7 +503,10 @@
const struct cm_result *const result)
{
assert(!cma_is_city_under_agent(pcity, NULL));
- return apply_result_on_server(pcity, result);
+ if (result->found_a_valid) {
+ return apply_result_on_server(pcity, result);
+ } else
+ return TRUE; /* ???????? */
}
/****************************************************************************
|
|