diff --git a/src/xenia/vfs/devices/stfs_xbox.h b/src/xenia/vfs/devices/stfs_xbox.h index cc63c0c34..913db3390 100644 --- a/src/xenia/vfs/devices/stfs_xbox.h +++ b/src/xenia/vfs/devices/stfs_xbox.h @@ -468,10 +468,12 @@ struct XContentMetadata { }; static_assert_size(XContentMetadata, 0x93D6); +static constexpr uint8_t license_count = 0x10; + struct XContentHeader { be magic; uint8_t signature[0x228]; - XContentLicense licenses[0x10]; + XContentLicense licenses[license_count]; uint8_t content_id[0x14]; be header_size; diff --git a/src/xenia/vfs/devices/xcontent_container_device.h b/src/xenia/vfs/devices/xcontent_container_device.h index 26c074fe9..7faa6ea76 100644 --- a/src/xenia/vfs/devices/xcontent_container_device.h +++ b/src/xenia/vfs/devices/xcontent_container_device.h @@ -65,7 +65,13 @@ class XContentContainerDevice : public Device { kernel::xam::XCONTENT_AGGREGATE_DATA content_header() const; uint32_t license_mask() const { - return header_->content_header.licenses[0].license_bits; + uint32_t final_license = 0; + for (uint8_t i = 0; i < license_count; i++) { + if (header_->content_header.licenses[i].license_flags) { + final_license |= header_->content_header.licenses[i].license_bits; + } + } + return final_license; } protected: