DEV9: Fix IP_PayloadPtr::WriteBytes()

This commit is contained in:
TheLastRar 2024-07-12 18:21:47 +01:00 committed by lightningterror
parent 5ea46ac076
commit b6b775e44e
1 changed files with 2 additions and 2 deletions

View File

@ -96,10 +96,10 @@ namespace PacketReader::IP
{ {
//If buffer & data point to the same location //If buffer & data point to the same location
//Then no copy is needed //Then no copy is needed
if (data == buffer) if (data == &buffer[*offset])
return; return;
memcpy(buffer, data, length); memcpy(&buffer[*offset], data, length);
*offset += length; *offset += length;
} }
virtual IP_Payload* Clone() const virtual IP_Payload* Clone() const