Fixed the final null terminator for RegMultiSz.
The RegMultiSz value should be terminated by an empty UTF-16 string, i.e. 2 null bytes.
This commit is contained in:
parent
94fa95c699
commit
91b10dd799
@ -526,7 +526,7 @@ impl<'a> PropertyData<'a> {
|
||||
PropertyData::Binary(val) => val.len(),
|
||||
PropertyData::DwordLittleEndian(val) | PropertyData::DwordBigEndian(val) => core::mem::size_of_val(val),
|
||||
PropertyData::RegMultiSz(val) => {
|
||||
core::mem::size_of::<u16>() * val.iter().map(|x| x.encode_utf16().count() + 1).sum::<usize>() + 1
|
||||
core::mem::size_of::<u16>() * (val.iter().map(|x| x.encode_utf16().count() + 1).sum::<usize>() + 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user