mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
fix packet list segment break
This commit is contained in:
parent
fe0cdc0529
commit
9a4cc1308d
1 changed files with 3 additions and 1 deletions
|
@ -83,8 +83,10 @@ qint64 PacketList::writeData(const char* data, qint64 maxSize) {
|
|||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
int segmentSize = _currentPacket->pos() - _segmentStartIndex;
|
||||
|
||||
// copy from currentPacket where the segment started to the beginning of the newPacket
|
||||
newPacket->write(_currentPacket->getPayload() + _segmentStartIndex, numBytesToEnd);
|
||||
newPacket->write(_currentPacket->getPayload() + _segmentStartIndex, segmentSize);
|
||||
|
||||
// the current segment now starts at the beginning of the new packet
|
||||
_segmentStartIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue