bugfix: Replace pointer dereference with read_unaligned
On Raspberry Pi, using the Rust crate eframe caused the program to crash on mouse movement. The Backtrace lead to this specific line of code, and the exact error was a "misaligned pointer dereference: address must be a multiple of 0x8 but is xxxx" The edit has been tested with the Raspberry Pi, which works now.
This commit is contained in:
parent
ab33fb8eda
commit
2b1c8cea1b
1 changed files with 1 additions and 1 deletions
|
|
@ -1424,7 +1424,7 @@ impl EventProcessor {
|
|||
if !xinput2::XIMaskIsSet(mask, i) {
|
||||
continue;
|
||||
}
|
||||
let x = unsafe { *value };
|
||||
let x = unsafe { value.read_unaligned() };
|
||||
|
||||
// We assume that every XInput2 device with analog axes is a pointing device emitting
|
||||
// relative coordinates.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue