Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

SDL_RegisterEvents() now rejects requests for numevents <= 0.

  • Loading branch information
icculus committed Aug 8, 2013
1 parent cbfbe09 commit 7d3b5642f7649773c6dd3d4f272f44a916322e25
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/events/SDL_events.c
@@ -599,7 +599,7 @@ SDL_RegisterEvents(int numevents)
{
Uint32 event_base;

if (SDL_userevents+numevents <= SDL_LASTEVENT) {
if ((numevents > 0) && (SDL_userevents+numevents <= SDL_LASTEVENT)) {
event_base = SDL_userevents;
SDL_userevents += numevents;
} else {

0 comments on commit 7d3b564

Please sign in to comment.