Hi,
while play levels higher than about 75 in 2 player cooperative mode, I get
segfaults everyonce in a while. Here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7dc5cf7 in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb7dc5cf7 in memcpy () from /lib/tls/libc.so.6
#1 0x08079306 in ShmPutBitmap (x=5, y=-1212977289, w=16, h=16, _dp=0x824cc10)
at shmbitmap.c:220
#2 0x0804e6f3 in draw_objects (draw=1) at koules.c:453
#3 0x0804c91a in game () at koules.c:1608
#4 0x0807677e in main (argc=136572936, argv=0x0) at init.c:936
(gdb)
I applied the attached patch and it fixed the problem for me.
Steffen
--- shmbitmap.c.org 2005-03-29 18:50:13.000000000 +0200
+++ shmbitmap.c 2005-03-29 18:51:24.000000000 +0200
@@ -187,6 +187,9 @@
void
ShmPutBitmap (int x, int y, int w, int h, void *_dp)
{
+ if (x < 0 || y < 0)
+ return;
+
/* no clipping */
uchar *dp = _dp;
uchar *vp, *vpline;