diff --git a/protocol/src/cursor.rs b/protocol/src/cursor.rs index 620df7b..fc3cbeb 100644 --- a/protocol/src/cursor.rs +++ b/protocol/src/cursor.rs @@ -65,7 +65,14 @@ macro_rules! impl_get_value { ($($t:ty),+ $(,)?) => { $(impl<'a> GetKeyValue<'a> for $t { fn get_key_value(cur: &mut Cursor<'a>) -> Result { - cur.get_key_value::<&str>()?.parse().map_err(|_| Error::InvalidPacket) + let s = cur.get_key_value::<&str>()?; + // HACK: special case for one asshole + let s = if s.len() > 2 && s.as_bytes()[0] == b'^' && s.as_bytes()[1].is_ascii_digit() { + &s[2..] + } else { + s + }; + s.parse().map_err(|_| Error::InvalidPacket) } })+ };