Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: SIGFPE in x11.c



I'm getting a SIGFPE on line 1195 of x11.c.  I'm running non-GTK under
FreeBSD.  It looks like the problem is that the weap_sp is being computed
there (instead of above due to compiler optimizations), and
cpl.stats.weapon_sp is zero.  Hence, a divide by zero.

My quick fix is to check the value of weapon_sp and to set weap_sp to zero
if it is zero instead of doing the division.

I'm still having some problems, but that gets it so that the client will
at least not fault immediately.

--PC
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]