Help ! SDL Event handling in threads..May be a bug

Hello .I want to use SDL event in a thread . My application seems to work
when using SDL 1.2.8 .But when I replace the sdl.dll with a 1.2.11 sdl.dll .
My application doesn’t work correctly. My OS is winXP sp2 .My compiler is VC++
6.0 sp4 . thanks.
a sample application code
#include <sdl.h>
#include <stdio.h>
#include <SDL_thread.h>

#pragma comment (lib,“SDL.lib”)
#pragma comment (lib,“SDLmain.lib”)

bool quit;
int SDLCALL thread1(void * params)
{
SDL_Event event;
while (!quit)
{
// ??event??
SDL_PumpEvents();
// ???
SDL_PeepEvents(&event,1,SDL_GETEVENT,0xffffffff);
/*
// ??? PumpEvents ? PeepEvents
// ???
SDL_PollEvent(&event);
*/
if (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_z)
{
printf (“z pressed !! in th1 \n”);
}
if (event.key.keysym.sym == SDLK_ESCAPE)
quit = true;
}
return 0;
}

int main (int argc, char * argv[])
{
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
printf(“Init Error !!\n”);
return 1;
}
SDL_Surface * screen = SDL_SetVideoMode(320,240,24, SDL_ANYFORMAT);
if (screen == NULL)
{
printf(“Video Error !! \n”);
SDL_Quit();
return 1;
}
SDL_Thread * th1 = SDL_CreateThread(thread1,0);
SDL_WaitThread(th1, NULL);
SDL_Quit();
return 0;
}