BMessage::Append() is now actually working.

This commit is contained in:
Axel Dörfler 2012-11-04 17:21:47 +01:00 committed by Alexander von Gluck IV
parent 2de44bbde7
commit 54dbbef088

View File

@ -2729,16 +2729,17 @@ BMessage::Append(const BMessage &other)
size_t size = field->data_size / field->count;
for (uint32 j = 0; j < field->count; j++) {
if (!isFixed)
if (!isFixed) {
size = *(uint32 *)data;
data = (const void *)((const char *)data + sizeof(uint32));
}
status_t status = AddData(name, field->type, data, size,
isFixed != 0, 1);
isFixed, 1);
if (status != B_OK)
return status;
data = (const void *)((const char *)data + size
+ (isFixed ? 0 : sizeof(uint32)));
data = (const void *)((const char *)data + size);
}
}
return B_OK;