Commit 722493d7 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix minor memory-related problems on MS-Windows revealed by Dr. Memory.

 src/w32fns.c (reset_modifiers): Zero out keystate[] before using it.
 (w32_wnd_proc): Initialize the dwHoverTime member of
 TRACKMOUSEEVENT structure.
parent f88bdc45
2014-03-19 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (reset_modifiers): Zero out keystate[] before using it.
(w32_wnd_proc): Initialize the dwHoverTime member of
TRACKMOUSEEVENT structure.
2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
* gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
......
......@@ -2099,6 +2099,7 @@ reset_modifiers (void)
#define CURRENT_STATE(key) ((GetAsyncKeyState (key) & 0x8000) >> 8)
memset (keystate, 0, sizeof (keystate));
GetKeyboardState (keystate);
keystate[VK_SHIFT] = CURRENT_STATE (VK_SHIFT);
keystate[VK_CONTROL] = CURRENT_STATE (VK_CONTROL);
......@@ -3444,6 +3445,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
tme.cbSize = sizeof (tme);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = hwnd;
tme.dwHoverTime = HOVER_DEFAULT;
track_mouse_event_fn (&tme);
track_mouse_window = hwnd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment