mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
ESFormats: Fix calculation of the ticket start offset
The signature part doesn't seem to appear more than once in a signed ticket, so we should always add that offset regardless of the ticket number.
This commit is contained in:
parent
e375c96693
commit
e9f23fbc92
@ -234,7 +234,7 @@ const std::vector<u8>& TicketReader::GetRawTicket() const
|
||||
std::vector<u8> TicketReader::GetRawTicketView(u32 ticket_num) const
|
||||
{
|
||||
// A ticket view is composed of a view ID + part of a ticket starting from the ticket_id field.
|
||||
const auto ticket_start = m_bytes.cbegin() + (GetOffset() + sizeof(Ticket)) * ticket_num;
|
||||
const auto ticket_start = m_bytes.cbegin() + GetOffset() + sizeof(Ticket) * ticket_num;
|
||||
const auto view_start = ticket_start + offsetof(Ticket, ticket_id);
|
||||
|
||||
// Copy the view ID to the buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user