Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
SDL_RegisterEvents() now rejects requests for numevents <= 0.
  • Loading branch information
icculus committed Aug 8, 2013
1 parent cbfbe09 commit 7d3b564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/SDL_events.c
Expand Up @@ -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 {
Expand Down

0 comments on commit 7d3b564

Please sign in to comment.