Re: [Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Marko Lindqvist
On 15 November 2011 16:39, Michal Mazurek
no-reply.invalid-addr...@gna.org wrote:

 This part is really perplexing:
 +verbose+
   2782             known[l * MAP_INDEX_SIZE + tile_index(ptile)]
   2783               |= (1u  (p - l * 8));
 -verbose-
 Suppose there is a player with index 60. p = 60, l = 1. (p - l * 8) = (60 -
 8) = 52. 1  52 bits is more than an int can handle.

 Comment above says that this is HACK so it's even known not to be
very clean implementation...

 I think someone has mixed number of bits and hex values at some
point. While we read 8 hex values to known[], here we handle it as
bits already, so that 8 should be 32 (p is always 0 to 31 bigger
than l*32)


 - ML

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-03 Thread Egor Vyscrebentsov
On Sun, 02 Oct 2011 15:07:05 +0200 Michal Mazurek wrote:

 I removed around 15 players using the /remove command. The server crashed. I
 only have a savegame from right before the /removes (which implies the turn
 change did not get to save). Here is what i got:
 
 
 #0  0x001ab454 in calc_civ_score (pplayer=0x20e131000) at
 score.c:199
 199   pcmap-player[player_index(owner)].landarea++;
 
 Either /remove is faulty, or my newcomer code is.

Version and gdb's 'bt full' might help.

-- 
WBR, Egor Vyscrebentsov

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev