Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] Re: (PR#14970) Economy bug
Home

[Freeciv-Dev] Re: (PR#14970) Economy bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: michael@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14970) Economy bug
From: "Bernd Pol" <bernd.pol@xxxxxxxxx>
Date: Mon, 26 Dec 2005 03:37:25 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14970 >

On 2005-12-25 16:25 Nicolas PALAU wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=14970 >
>
> On Saturday 24 December 2005 18:47, Michael Mielke wrote:
>   
>> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=14970 >
>>
>> in the economy tab it is showing a total cost of 0 for upkeep when
>> improvements require upkeep
>>     
> Bug #14970 == #14308.
>   
This patch solves the problem here for the GTK GUI.
It is the outcome of a quick hunt, however. In particular the line

total += units_total;

might be superfluous.

Hope, it helps
Bernd



--- repodlgs.c.orig     2005-10-03 04:50:47.000000000 +0200
+++ repodlgs.c  2005-12-26 12:07:48.000000000 +0100
@@ -830,7 +830,7 @@
 void economy_report_dialog_update(void)
 {
   if(!is_report_dialogs_frozen() && economy_dialog_shell) {
-    int tax, total, i, entries_used, nbr_impr;
+    int tax, total, i, entries_used, nbr_impr, units_total;
     char economy_total[48];
     struct improvement_entry entries[B_LAST];
     struct unit_entry entries_units[U_LAST];
@@ -862,7 +862,8 @@
 
     nbr_impr = entries_used;
     entries_used = 0;
-    get_economy_report_units_data(entries_units, &entries_used, &total);
+    get_economy_report_units_data(entries_units, &entries_used, &units_total);
+    total += units_total;
 
     for (i = 0; i < entries_used; i++) {
       gtk_list_store_append(economy_store, &it);

[Prev in Thread] Current Thread [Next in Thread]