mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Update BasePacket::read to do a copy
This commit is contained in:
parent
6bba2f4cb1
commit
2efba00e3e
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ void BasePacket::setPayloadSize(qint64 payloadSize) {
|
|||
|
||||
QByteArray BasePacket::read(qint64 maxSize) {
|
||||
qint64 sizeToRead = std::min(size() - pos(), maxSize);
|
||||
QByteArray data { QByteArray::fromRawData(getPayload() + pos(), sizeToRead) };
|
||||
QByteArray data { QByteArray(getPayload() + pos(), sizeToRead) };
|
||||
seek(pos() + sizeToRead);
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue