On 15 November 2011 16:39, Michal Mazurek <[email protected]> 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 [email protected] https://mail.gna.org/listinfo/freeciv-dev
