SDL_RegisterEvents() now rejects requests for numevents <= 0.
authorRyan C. Gordon
Thu, 08 Aug 2013 15:04:30 -0700
changeset 7611ed6f4b8557e4
parent 7610 b043c5c726c1
child 7612 627d571587d3
SDL_RegisterEvents() now rejects requests for numevents <= 0.
src/events/SDL_events.c
     1.1 --- a/src/events/SDL_events.c	Thu Aug 08 13:29:44 2013 -0700
     1.2 +++ b/src/events/SDL_events.c	Thu Aug 08 15:04:30 2013 -0700
     1.3 @@ -599,7 +599,7 @@
     1.4  {
     1.5      Uint32 event_base;
     1.6  
     1.7 -    if (SDL_userevents+numevents <= SDL_LASTEVENT) {
     1.8 +    if ((numevents > 0) && (SDL_userevents+numevents <= SDL_LASTEVENT)) {
     1.9          event_base = SDL_userevents;
    1.10          SDL_userevents += numevents;
    1.11      } else {