diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-04-29 17:34:20 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-04-29 17:34:20 +0200 |
commit | f0ea067812451c495fc19b71d8f20fa126c976ab (patch) | |
tree | 16b0d168a0f99e0cd5be0bcbd09415e771e562d6 /src/event.rs | |
parent | 611a4b0531c06a4ac7dd5d9ee254baae079aa208 (diff) | |
download | evtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.tar.gz evtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.tar.bz2 evtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.zip |
fix long number literal
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 6 |
1 files 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, |