bdSteamAuth: remove static_cast

This commit is contained in:
Edo 2023-04-30 20:15:13 +01:00 committed by GitHub
parent f099c95975
commit a33c2ae198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,10 +21,10 @@ namespace demonware
buffer.read_uint32(&ticket_size); buffer.read_uint32(&ticket_size);
uint8_t ticket[1024]; uint8_t ticket[1024];
buffer.read_bytes(std::min(ticket_size, static_cast<uint32_t>(sizeof(ticket))), ticket); buffer.read_bytes(std::min<uint32_t>(ticket_size, sizeof(ticket)), ticket);
game::native::bdAuthTicket auth_ticket{}; game::native::bdAuthTicket auth_ticket{};
std::memset(&auth_ticket, 0xA, sizeof auth_ticket); std::memset(&auth_ticket, 0xA, sizeof(auth_ticket));
auth_ticket.m_magicNumber = 0x0EFBDADDE; auth_ticket.m_magicNumber = 0x0EFBDADDE;
auth_ticket.m_type = 0; auth_ticket.m_type = 0;