mirror of
https://github.com/stalwartlabs/stalwart.git
synced 2026-03-17 14:34:03 +00:00
Migration: fix legacy deserialization (#2674)
This commit is contained in:
@@ -519,7 +519,7 @@ fn deserialize_keyword(bytes: &mut std::slice::Iter<'_, u8>) -> Option<LegacyKey
|
||||
FORWARDED => 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()?);
|
||||
|
||||
@@ -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()?);
|
||||
|
||||
Reference in New Issue
Block a user