Clear the padding to 0 when flattening to the R5 message format. Besides being
cleaner it allows for binary comparison of flattened messages. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31908 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2ea893b2a0
commit
48a7b12ad8
@ -469,7 +469,9 @@ MessageAdapter::_FlattenR5Message(uint32 format, const BMessage *from,
|
||||
for (int32 i = 0; i < field->count; i++) {
|
||||
ssize_t itemSize = *(ssize_t *)source + sizeof(ssize_t);
|
||||
memcpy(pointer, source, itemSize);
|
||||
pointer += pad_to_8(itemSize);
|
||||
ssize_t paddedSize = pad_to_8(itemSize);
|
||||
memset(pointer + itemSize, 0, paddedSize - itemSize);
|
||||
pointer += paddedSize;
|
||||
source += itemSize;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user