#1 2012-01-11 09:57:36

maho
Player
Posts: 161

bug - where submit to?

Where should be bugs submitted? To redmine.pagema.net? Or some other place? Or here?

Anyway - I found a bug - today I bribed city, which costed me -120 thousands, so I became richer after bribing than before smile.

Offline

#2 2012-01-11 10:26:39

akfaew
Administrator
Posts: 622

Re: bug - where submit to?

LOL, this is a terrible bug! I think gna.org is the best place for that. I don't have much time today, can someone investigate?

Offline

#3 2012-01-11 10:29:39

maho
Player
Posts: 161

Re: bug - where submit to?

I think that bug report without full ruleset and savegame of previous turn would be worthless. So I think you're the best candidate to fill bug there. It regards bribing city [l tgt="city" id=8552 name="Kefe" /] by spy from [l tgt="city" id=8475 name="Panama Channel" /]

Offline

#4 2012-01-11 11:08:42

Kryon
Administrator
Posts: 370

Re: bug - where submit to?

Hopefully there is no such bug in LT30! 120K gold would be such a game changer!

Offline

#5 2012-01-11 12:52:27

kevin551
Player
Posts: 360

Re: bug - where submit to?

This is the funniest thing that has happened for quite a well. Something to liven up a really dull game. I had announced I was going to quit this game earlier today, but this bug makes the game exciting again. I have tried inciting cities before and after this event but only get very high positive numbers. I am guessing that the error comes when the incite cost is greater than 256,000 or some such number it goes out of the range of a signed integer and becomes negative. This bug will almost certainly exist in LT30 but I doubt we'll find out for 3 or 4 months.

Offline

#6 2012-01-11 13:40:46

kevin551
Player
Posts: 360

Re: bug - where submit to?

Time to crack out the 18 year old malt whisky. I just bought a city for -360,000. I have bought 59 factories and the Hoover Dam and I still have 300,000+ change.

Offline

#7 2012-01-11 14:13:02

kevin551
Player
Posts: 360

Re: bug - where submit to?

I have submitted a bug report to gna.org.

Offline

#8 2012-01-11 19:17:30

akfaew
Administrator
Posts: 622

Re: bug - where submit to?

diff --git a/server/cityturn.c b/server/cityturn.c
index 585c3ad..6ac9113 100644
--- a/server/cityturn.c
+++ b/server/cityturn.c
@@ -2046,7 +2046,8 @@ static void check_pollution(struct city *pcity)
 int city_incite_cost(struct player *pplayer, struct city *pcity)
 {
   struct city *capital;
-  int dist, size, cost;
+  int dist, size;
+  unsigned long long int cost;
 
   if (get_city_bonus(pcity, EFT_NO_INCITE) > 0) {
     return INCITE_IMPOSSIBLE_COST;
@@ -2109,6 +2110,8 @@ int city_incite_cost(struct player *pplayer, struct city *pcity)
   cost += (cost * get_city_bonus(pcity, EFT_INCITE_COST_PCT)) / 100;
   cost /= 100;
 
+  if (cost > INT_MAX)
+    return INCITE_IMPOSSIBLE_COST;
   return cost;
 }
 

I'll try this

Offline

#9 2012-01-11 19:44:21

akfaew
Administrator
Posts: 622

Re: bug - where submit to?

I guess I should give everybody a chance to exploit the bug... I'll apply the patch 24 hours from now.

I guess mbook didn't have this in mind when he designed the ruleset.

Offline

#10 2012-01-14 18:11:30

pipo
Player
Posts: 59

Re: bug - where submit to?

This is one of the reasons that Freeciv is less attractive now.  It has become a 'chase the bug' or 'find the hack' game.  I would rather play with an old version server and 'standard' ruleset than trying to hack my way in winning using one of these loop-arounds.  If, when, I do want to hack something, I will find something else than a game hack and hopefully more useful.

BTW, speaking of hacking, for those of you interested in geopolitics, STRATFOR.COM is allowing free access to its site, following a recent hack on their servers.

"The greater the number of laws and enactments, the more thieves and robbers there will be." -- Lao-tzu

Offline

Board footer

Powered by FluxBB