Ensure fields of SyncRect are not reordered

Without repr(C), repr(packed) technically allows reordering fields.
This commit is contained in:
bjorn3
2024-07-19 21:56:56 +02:00
parent ef29520cf5
commit 857773393d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,