From c4415009c04990d04549a971f01e150e1d5ef79e Mon Sep 17 00:00:00 2001 From: James Tucker Date: Thu, 28 Mar 2024 11:45:34 -0700 Subject: [PATCH] windows: remove github URLs from binaries There are AV rules out there which cause almost any program that contains github URLs to become marked as malware. While those rules are spurious, they're years old, and AV vendors have a very poor reputation at appropriately following up with these problems. Remove these strings from the panic data present in the binary prevents binaries linking the winit from being spuriously marked as Trojan:Win32/Wacatac.B!ml. --- src/platform_impl/windows/event_loop.rs | 2 +- src/platform_impl/windows/window.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index f7d91caa..c19cc386 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -1245,7 +1245,7 @@ unsafe fn public_window_callback_inner( let new_rect = if window_pos.flags & NOMOVE_OR_NOSIZE != 0 { let cur_rect = util::WindowArea::Outer.get_rect(window) - .expect("Unexpected GetWindowRect failure; please report this error to https://github.com/rust-windowing/winit"); + .expect("Unexpected GetWindowRect failure; please report this error to rust-windowing/winit"); match window_pos.flags & NOMOVE_OR_NOSIZE { NOMOVE_OR_NOSIZE => None, diff --git a/src/platform_impl/windows/window.rs b/src/platform_impl/windows/window.rs index 9a669c28..454845fa 100644 --- a/src/platform_impl/windows/window.rs +++ b/src/platform_impl/windows/window.rs @@ -180,14 +180,14 @@ impl Window { pub fn outer_position(&self) -> Result, NotSupportedError> { util::WindowArea::Outer.get_rect(self.hwnd()) .map(|rect| Ok(PhysicalPosition::new(rect.left, rect.top))) - .expect("Unexpected GetWindowRect failure; please report this error to https://github.com/rust-windowing/winit") + .expect("Unexpected GetWindowRect failure; please report this error to rust-windowing/winit") } #[inline] pub fn inner_position(&self) -> Result, NotSupportedError> { let mut position: POINT = unsafe { mem::zeroed() }; if unsafe { ClientToScreen(self.hwnd(), &mut position) } == false.into() { - panic!("Unexpected ClientToScreen failure: please report this error to https://github.com/rust-windowing/winit") + panic!("Unexpected ClientToScreen failure: please report this error to rust-windowing/winit") } Ok(PhysicalPosition::new(position.x, position.y)) } @@ -223,7 +223,7 @@ impl Window { pub fn inner_size(&self) -> PhysicalSize { let mut rect: RECT = unsafe { mem::zeroed() }; if unsafe { GetClientRect(self.hwnd(), &mut rect) } == false.into() { - panic!("Unexpected GetClientRect failure: please report this error to https://github.com/rust-windowing/winit") + panic!("Unexpected GetClientRect failure: please report this error to rust-windowing/winit") } PhysicalSize::new( (rect.right - rect.left) as u32,