Skip to content

Commit

Permalink
EVENTS: Fix a case of reading uninitialized data
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Jan 29, 2014
1 parent 68a2bce commit 997fd78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/events/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ void EventsManager::processEvents() {
while (SDL_PollEvent(&event)) {

// Check repeated event.
if (event.key.repeat && !_repeat)
if (((event.type == kEventKeyDown) || (event.type == kEventKeyUp)) &&
event.key.repeat && !_repeat)
continue;

// Check for quit events
Expand Down

0 comments on commit 997fd78

Please sign in to comment.