aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-04-29 17:34:20 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-04-29 17:34:20 +0200
commitf0ea067812451c495fc19b71d8f20fa126c976ab (patch)
tree16b0d168a0f99e0cd5be0bcbd09415e771e562d6
parent611a4b0531c06a4ac7dd5d9ee254baae079aa208 (diff)
downloadevtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.tar.gz
evtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.tar.bz2
evtclib-f0ea067812451c495fc19b71d8f20fa126c976ab.zip
fix long number literal
-rw-r--r--src/event.rs6
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,