Zero out the audio hotplug event structure, so the "padded" fields are sane.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 19 Mar 2015 22:11:20 -0400
changeset 9401529007547fb6
parent 9400 6f662d802380
child 9402 bd133a872458
Zero out the audio hotplug event structure, so the "padded" fields are sane.

Just in case we ever need those bits in the future.
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Thu Mar 19 22:08:12 2015 -0400
     1.2 +++ b/src/audio/SDL_audio.c	Thu Mar 19 22:11:20 2015 -0400
     1.3 @@ -351,6 +351,7 @@
     1.4          /* Post the event, if desired */
     1.5          if (SDL_GetEventState(SDL_AUDIODEVICEADDED) == SDL_ENABLE) {
     1.6              SDL_Event event;
     1.7 +            SDL_zero(event);
     1.8              event.adevice.type = SDL_AUDIODEVICEADDED;
     1.9              event.adevice.which = device_index;
    1.10              event.adevice.iscapture = iscapture;
    1.11 @@ -377,6 +378,7 @@
    1.12      /* Post the event, if desired */
    1.13      if (SDL_GetEventState(SDL_AUDIODEVICEREMOVED) == SDL_ENABLE) {
    1.14          SDL_Event event;
    1.15 +        SDL_zero(event);
    1.16          event.adevice.type = SDL_AUDIODEVICEREMOVED;
    1.17          event.adevice.which = device->id;
    1.18          event.adevice.iscapture = device->iscapture ? 1 : 0;