diff --git a/src/sniffer.rs b/src/sniffer.rs index 26c5c88..03f29a4 100644 --- a/src/sniffer.rs +++ b/src/sniffer.rs @@ -122,7 +122,7 @@ fn write_input_instruction(state:&mut InputInstructionDeltaSta |crate::physics::InputInstruction::Idle=>0u32,//TODO: don't write idle instructions }; //instruction id packed with game control parity bit. This could be 1 byte but it ruins the alignment - w.write(&(ins.instruction as u32|parity).to_le_bytes());//4B + w.write(&(unsafe{std::mem::transmute::(ins.instruction)}|parity).to_le_bytes());//4B match &ins.instruction{ &crate::physics::InputInstruction::MoveMouse(m)=>{//4B let dm=m-state.mouse_pos;