Commit b53c35df431afb6e436e97f5924358e8ade0085c

Sam Lantinga 2017-10-11T13:26:58

Fixed size in realloc

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 0049c90..777c273 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;