Decompile fn_20424 (CPacketQueue::Prepend)
Batch #16036 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_20424 CPacketQueue::Prepend: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, youko, kyoshi Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
83aac8afdd
commit
524fcf2959
1 changed files with 2 additions and 1 deletions
|
|
@ -51,8 +51,9 @@ void CPacketQueue::InsertData(int bytes, const void* source) {
|
|||
// OFFSET: 0x00C7F160
|
||||
// FUNCTION: fn_20424
|
||||
void CPacketQueue::Prepend(int bytes, const void* source) {
|
||||
const int size = std::max(static_cast<int>(this->m_storage.size()), this->GetSize() + bytes);
|
||||
std::vector<char> storage;
|
||||
storage.resize(std::max(static_cast<int>(this->m_storage.size()), this->GetSize() + bytes));
|
||||
storage.resize(size);
|
||||
std::memcpy(storage.data(), source, bytes);
|
||||
std::memcpy(storage.data() + bytes, this->m_data + this->m_read, this->GetSize());
|
||||
this->m_write = this->GetSize() + bytes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue