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 21, 2014
1 parent d82a329 commit e32b25a
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 e32b25a

Please sign in to comment.