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:
Léo Lam 2017-02-28 18:42:06 +01:00
parent e375c96693
commit e9f23fbc92
1 changed files with 1 additions and 1 deletions

View File

@ -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.