Ensure fields of SyncRect are not reordered
Without repr(C), repr(packed) technically allows reordering fields.
This commit is contained in:
@@ -13,7 +13,7 @@ use syscall::{O_CLOEXEC, O_NONBLOCK, O_RDWR};
|
||||
|
||||
// Keep synced with vesad
|
||||
#[derive(Clone, Copy)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
pub struct SyncRect {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
|
||||
@@ -9,7 +9,7 @@ use crate::display::OffscreenBuffer;
|
||||
|
||||
// Keep synced with orbital
|
||||
#[derive(Clone, Copy)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
pub struct SyncRect {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
|
||||
Reference in New Issue
Block a user