Follow-up Comment #24, bug #18776 (project freeciv):
> [bit] = p - floor(p/32) * 8
> which limits it to values between 0 and 31.
Does it? p - player index in 0..127. let p = 127.
p - floor(p/32) * 8 = 127 - 3 * 8 = 103.
I run just this part in a test c program. This is really weird.
#include <stdio.h>
int
main()
{
int a;
for (a = 0; a < 128; a++) {
int l = a / 32;
printf("%xn", 1u << (a - l * 8));
}
return 0;
}
I didn't restart a game with > 32 players, with a player with an index > 32
being not an idler. The Finns didn't respond to me on irc, if they restarted
their server or not. But something tells me this code will do strange things
if there are more than 32 players (I still dont understand it). Why isn't that
1 just shifted by p % 32?
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18776>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev