From 79747a7a65d808a23e6e9a44247da38cf5914708 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 14 Jul 2010 07:25:07 -0700 Subject: [PATCH] Zero any fields not explicitly filled in. --- src/video/x11/SDL_x11events.c | 1 + src/video/x11/SDL_x11window.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 9c3387f8b..514a98d7c 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -381,6 +381,7 @@ X11_DispatchEvent(_THIS) req->requestor, req->target); #endif + SDL_zero(sevent); sevent.xany.type = SelectionNotify; sevent.xselection.selection = req->selection; sevent.xselection.target = None; diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index c417e6647..85b2a85b0 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -972,6 +972,7 @@ X11_SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) 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;