From b53c35df431afb6e436e97f5924358e8ade0085c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 11 Oct 2017 13:26:58 -0700 Subject: [PATCH] Fixed size in realloc --- src/events/SDL_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index 0049c9068..777c27399 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -799,7 +799,7 @@ SDL_AddEventWatch(SDL_EventFilter filter, void *userdata) if (!SDL_event_watchers_lock || SDL_LockMutex(SDL_event_watchers_lock) == 0) { SDL_EventWatcher *event_watchers; - event_watchers = SDL_realloc(SDL_event_watchers, (SDL_event_watchers_count + 1) * sizeof(event_watchers)); + event_watchers = SDL_realloc(SDL_event_watchers, (SDL_event_watchers_count + 1) * sizeof(*event_watchers)); if (event_watchers) { SDL_EventWatcher *watcher;