agmuelle@medusa.informatik.uni-erlangen.de (Gil Mueller ) (07/05/90)
I found another bug in the file autoshoot.c. It causes system crashes
during update when you order to bombard a planet. The real is a
division by zero in line 173 in autoshoot.c.
This happens when you bombard a planet without defending ships and
destructs so that numretal = 0.
A fix may be to replace line 173 in autshoot.c:
numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
&dist, tech/numretal, telegram_buf, 0); /* (0=dont get smap) */
by:
if (numretal) {
numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
&dist, tech/numretal, telegram_buf, 0); /* (0=dont get smap) */
}