Fixup optional flattenable binder obj structure

This commit is contained in:
Billy Laws 2022-12-27 19:18:58 +00:00
parent 90e21b0ca1
commit 7315ba04e6

View File

@ -86,8 +86,7 @@ namespace skyline::service::hosbinder {
void PushOptionalFlattenable(ObjectType *pointer) {
Push<u32>(pointer != nullptr);
if (pointer) {
Push<u32>(sizeof(ObjectType)); // Object Size
Push<u32>(0); // FD Count
Push<i64>(sizeof(ObjectType)); // Object Size
Push(*pointer);
}
}
@ -96,8 +95,7 @@ namespace skyline::service::hosbinder {
void PushOptionalFlattenable(std::optional<ObjectType> object) {
Push<u32>(object.has_value());
if (object) {
Push<u32>(sizeof(ObjectType));
Push<u32>(0);
Push<i64>(sizeof(ObjectType));
Push(*object);
}
}