Skip to content

Commit

Permalink
return pointer with mutable provenance from FRect::raw_mut
Browse files Browse the repository at this point in the history
before this commit writing to the pointer returned by `FRect::raw_mut`
was undefined behavior.
  • Loading branch information
antonilol committed Sep 20, 2024
1 parent f642dd2 commit 103d5bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sdl2/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 103d5bd

Please sign in to comment.