Bug: blitting 32bpp to 16bpp crashes

Hi,

I found following bugs:
Display:
XF 4.0.2 width display 15bpp or 16bpp (nvidia 0.9.6 TNT 2)
Following crashes:
./testsprite -bpp 32
Screen is at 32 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

Backtrace says:
0x40024918 in _init () from /usr/lib/libSDL-1.1.so.0
(gdb) bt
#0 0x40024918 in _init () from /usr/lib/libSDL-1.1.so.0
#1 0x40040b40 in SDL_LowerBlit (src=0x804ec30, srcrect=0x8050dc8,
dst=0x804dad0, dstrect=0x8050dc8) at SDL_surface.c:365
#2 0x40042ebd in SDL_UpdateRects (screen=0x804ec30, numrects=100,
rects=0x8050d80) at SDL_video.c:937
#3 0x8048db7 in MoveSprites (screen=0x804ec30, background=0)
at testsprite.c:89
#4 0x8049376 in main (argc=1, argv=0xbffffbe4) at testsprite.c:278
#5 0x400d2dcc in __libc_start_main () from /lib/libc.so.6

and second:
if display is 15bpp and ./testsprite -bpp 15 is slower
than ./testsprite -bpp 16, which seems wrong.

All with the CVS version from tonight.

Hope this helps,
Johns–
Become famous, earn no money, create music or graphics for FreeCraft

http://FreeCraft.Org - A free fantasy real-time strategy game engine
http://fgp.cjb.net - The FreeCraft Graphics Project