From f0ea067812451c495fc19b71d8f20fa126c976ab Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 29 Apr 2020 17:34:20 +0200 Subject: fix long number literal --- src/event.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event.rs b/src/event.rs index 44d9bc1..0ccbced 100644 --- a/src/event.rs +++ b/src/event.rs @@ -313,19 +313,19 @@ impl TryFrom<&raw::CbtEvent> for Event { CbtStateChange::Position => EventKind::Position { agent_addr: raw_event.src_agent, x: f32::from_bits((raw_event.dst_agent >> 32) as u32), - y: f32::from_bits((raw_event.dst_agent & 0xffffffff) as u32), + y: f32::from_bits((raw_event.dst_agent & 0xffff_ffff) as u32), z: f32::from_bits(raw_event.value as u32), }, CbtStateChange::Velocity => EventKind::Velocity { agent_addr: raw_event.src_agent, x: f32::from_bits((raw_event.dst_agent >> 32) as u32), - y: f32::from_bits((raw_event.dst_agent & 0xffffffff) as u32), + y: f32::from_bits((raw_event.dst_agent & 0xffff_ffff) as u32), z: f32::from_bits(raw_event.value as u32), }, CbtStateChange::Facing => EventKind::Facing { agent_addr: raw_event.src_agent, x: f32::from_bits((raw_event.dst_agent >> 32) as u32), - y: f32::from_bits((raw_event.dst_agent & 0xffffffff) as u32), + y: f32::from_bits((raw_event.dst_agent & 0xffff_ffff) as u32), }, CbtStateChange::MapId => EventKind::MapId { map_id: raw_event.src_agent, -- cgit v1.2.3