From d2034b1700094c99c4317fa17eb308786fbeb786 Mon Sep 17 00:00:00 2001 From: Osspial Date: Wed, 2 Aug 2017 20:50:55 -0400 Subject: [PATCH] Add null terminator to custom events --- src/platform/windows/events_loop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/windows/events_loop.rs b/src/platform/windows/events_loop.rs index 0926031d..b4bc70ac 100644 --- a/src/platform/windows/events_loop.rs +++ b/src/platform/windows/events_loop.rs @@ -271,7 +271,7 @@ lazy_static! { // WPARAM and LPARAM are unused. static ref WAKEUP_MSG_ID: u32 = { unsafe { - user32::RegisterWindowMessageA("Winit::WakeupMsg".as_ptr() as *const i8) + user32::RegisterWindowMessageA("Winit::WakeupMsg\0".as_ptr() as *const i8) } }; // Message sent when we want to execute a closure in the thread. @@ -279,7 +279,7 @@ lazy_static! { // and LPARAM is unused. static ref EXEC_MSG_ID: u32 = { unsafe { - user32::RegisterWindowMessageA("Winit::ExecMsg".as_ptr() as *const i8) + user32::RegisterWindowMessageA("Winit::ExecMsg\0".as_ptr() as *const i8) } }; // Message sent when the parent thread receives a resize event and wants this thread to use any