Zero any fields not explicitly filled in.
authorSam Lantinga <slouken@libsdl.org>
Wed, 14 Jul 2010 07:25:07 -0700
changeset 4524 a256e1dadf3f
parent 4523 657bea918a30
child 4525 3abf0b9cafad
Zero any fields not explicitly filled in.
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11events.c	Wed Jul 14 01:02:18 2010 -0700
+++ b/src/video/x11/SDL_x11events.c	Wed Jul 14 07:25:07 2010 -0700
@@ -381,6 +381,7 @@
                 req->requestor, req->target);
 #endif
 
+            SDL_zero(sevent);
             sevent.xany.type = SelectionNotify;
             sevent.xselection.selection = req->selection;
             sevent.xselection.target = None;
--- a/src/video/x11/SDL_x11window.c	Wed Jul 14 01:02:18 2010 -0700
+++ b/src/video/x11/SDL_x11window.c	Wed Jul 14 07:25:07 2010 -0700
@@ -972,6 +972,7 @@
     if (X11_IsWindowMapped(_this, window)) {
         XEvent e;
 
+        SDL_zero(e);
         e.xany.type = ClientMessage;
         e.xclient.message_type = _NET_WM_STATE;
         e.xclient.format = 32;