- changed status to resolved
Floating point exception in Food overlay map
Issue #140
resolved
Go to food overlay map and hover the mouse on some empty houses...
Program received signal SIGFPE, Arithmetic exception.
0x0000000000a48b23 in gfx::LayerFood::handleEvent (this=0x31e05e0, event=...)
at /home/b606/git/caesaria/source/gfx/layerfood.cpp:128
(gdb)
The line 128 of that file reads:
int monthWithFood = 2 * foodQty / house->habitants().count();
and obviously crash when house->habitants().count() = 0. Somewhere else we have:
void House::_updateMorale()
...
int monthWithFood = foodStoreQty / (habtnConsumeGoodQty+1);
Comments (1)
-
repo owner - Log in to comment
fix
#140. housing image now replace when climate change→ <<cset d2f35faf854e>>