src/events/SDL_events.c
changeset 352 b49fc922e7f6
parent 297 f6ffac90895c
child 353 d47637068e52
--- a/src/events/SDL_events.c	Sun Apr 14 22:17:50 2002 +0000
+++ b/src/events/SDL_events.c	Mon Apr 15 04:51:26 2002 +0000
@@ -372,7 +372,10 @@
 {
 	SDL_PumpEvents();
 
-	return(SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS));
+	/* We can't return -1, just return 0 (no event) on error */
+	if ( SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS) <= 0 )
+		return 0;
+	return 1;
 }
 
 int SDL_WaitEvent (SDL_Event *event)