vlineColor SEGFAULTS

Hi,

the vlineColor function of SDL_gfx cause SEGFAULT.
This seems to be related to clipping.

System: FreeBSD 5.4-STABLE amd64. (OBS: LP64)
SDL_gfx 2.0.13 & SDL 1.2.8

Test program. (Causes consistent crash for me):

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include <SDL_gfxPrimitives.h>

int
main()
{
SDL_Surface *screen;
if ( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE);
if ( screen == NULL ) {
fprintf(stderr, “Unable to set 640x480x16 video: %s\n”, SDL_GetError());
exit(1);
}

if (SDL_MUSTLOCK(screen)) {
if ( SDL_LockSurface(screen) < 0 ) {
fprintf(stderr, “SDL_LockSurface failed!\n”);
exit(1);
}
}

vlineRGBA(screen, 10, 481, 400, 255,0,0,255);

if (SDL_MUSTLOCK(screen)) {
SDL_UnlockSurface(screen);
}
SDL_Flip(screen);
SDL_Delay(3000);
return 0;
}

I had a pretty bad bug-hunt because of this, a random number generator,
and a remote likelihood of starting this line outside the screen.

My workaround: replacing vline* with line*.

Steinar