From 103d5bdecbef9da97b96a2acaa255fe6f9f653c6 Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <56turtle56@gmail.com> Date: Wed, 18 Sep 2024 23:00:15 +0200 Subject: [PATCH] return pointer with mutable provenance from `FRect::raw_mut` before this commit writing to the pointer returned by `FRect::raw_mut` was undefined behavior. --- src/sdl2/rect.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl2/rect.rs b/src/sdl2/rect.rs index 79f8957ed0..4e0e4c0929 100644 --- a/src/sdl2/rect.rs +++ b/src/sdl2/rect.rs @@ -1360,7 +1360,7 @@ impl FRect { } pub fn raw_mut(&mut self) -> *mut sys::SDL_FRect { - self.raw() as *mut _ + &mut self.raw } #[doc(alias = "SDL_FRect")]