[Freeciv-Dev] spaceship buglet
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
If you launch a spaceship with a BC arrival date, in the spaceship
dialog the "Year of arrival" is displayed as 2^16+arrival date. The
game otherwise works as expected (apart from the fact that it's
reported as "Game: The Romans have launched a spaceship! It is
estimated to arrive on Alpha Centauri in -505", rather then in
"505 BC").
This bug follows from a mismatch in put_int16/get_int16 of
pinfo->arrival_year for negative numbers. Promoting them to int32
appears to correct the bug. But I feel that all the present network
machinery does not handle cleanly signed int's: what happens with
machines having sizeof(int) > 32 ? Maybe get_int16/get_int32 should
check the leftmost bit received, and propagate it further left if we
received less then sizeof(int) bits.
Regards,
Massimo
- [Freeciv-Dev] spaceship buglet,
Massimo Campostrini <=
|
|