diff --git a/crates/migration/src/email_v1.rs b/crates/migration/src/email_v1.rs index 0f4b8ccda..2fb3378c1 100644 --- a/crates/migration/src/email_v1.rs +++ b/crates/migration/src/email_v1.rs @@ -519,7 +519,7 @@ fn deserialize_keyword(bytes: &mut std::slice::Iter<'_, u8>) -> Option Some(LegacyKeyword::Forwarded), MDN_SENT => Some(LegacyKeyword::MdnSent), other => { - let len = other - OTHER; + let len = other - 12; let mut keyword = Vec::with_capacity(len); for _ in 0..len { keyword.push(*bytes.next()?); diff --git a/crates/migration/src/object.rs b/crates/migration/src/object.rs index 2f820e7dc..832dfe7b6 100644 --- a/crates/migration/src/object.rs +++ b/crates/migration/src/object.rs @@ -327,7 +327,7 @@ impl DeserializeFrom for Keyword { FORWARDED => Some(Keyword::Forwarded), MDN_SENT => Some(Keyword::MdnSent), other => { - let len = other - OTHER; + let len = other - 12; let mut keyword = Vec::with_capacity(len); for _ in 0..len { keyword.push(*bytes.next()?);