Bug#392774: wormux: blocks the whole X session when GNU touches the
first object
Steve Langasek
vorlon at debian.org
Sun Nov 12 03:23:59 CET 2006
On Sun, Nov 12, 2006 at 03:11:44AM +0200, Tuukka Hastrup wrote:
> Hi,
> I had a look at this bug and one simple fix you could at least do is
> switch the possibly endless loops into an fmod function call. This would
> reduce the severity of this bug significantly.
I'm not sure I agree that this should be considered to reduce the severity;
in the case where the value of angle is wrong by 306 orders of magnitude,
there's insufficient precision to get a meaningful result with fmod or
otherwise, so in practice this still may make the game unusable.
Anyway, the submitter claims that there is a fix now for the underlying bug,
but he's told me this only in a throwaway comment on IRC with no follow-up
to the bug report, so I have no idea what that fix is or when it will be
available for uploading. :P
> --- src/weapon/gnu.cpp.orig 2006-11-12 01:08:13.000000000 +0200
> +++ src/weapon/gnu.cpp 2006-11-12 01:12:57.000000000 +0200
> @@ -80,8 +80,7 @@
> //sometimes, angle==infinite (according to gdb) ??
> GetSpeed(norme, angle);
> - while(angle < -M_PI) angle += M_PI;
> - while(angle > M_PI) angle -= M_PI;
> + angle = fmod(angle, M_PI);
> angle *= 180.0 / M_PI;
> angle /= 2.0;
> And #include <math.h>
> By the way, there seem to be similarily unnecessary loops in
> src/graphic/sprite.cpp, src/map/ground.cpp, src/map/water.cpp
Those do certainly seem to be worth fixing in their own right.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon at debian.org http://www.debian.org/
More information about the Pkg-games-devel
mailing list