Fixed resizing of PubSub
@@ -84,7 +84,7 @@ void PubSub_AddEventTypes(wPubSub* pubSub, wEventType* events, int count)
wEventType *new_event;
new_size = pubSub->size * 2;
- new_event = (wEventType*) realloc(pubSub->events, new_size);
+ new_event = (wEventType*) realloc(pubSub->events, new_size * sizeof(wEventType));
if (!new_event)
return;
pubSub->size = new_size;
