mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
SFXMemoryStream::read clarification.
This commit is contained in:
parent
1d754d92d7
commit
32707c5e53
1 changed files with 6 additions and 6 deletions
|
|
@ -80,13 +80,13 @@ U32 SFXMemoryStream::read( U8* buffer, U32 length )
|
||||||
|
|
||||||
if( numBytesLeftInCurrentPacket )
|
if( numBytesLeftInCurrentPacket )
|
||||||
{
|
{
|
||||||
const U32 numBytesToCopy = getMin( numBytesLeftInCurrentPacket, numBytesLeftToCopy );
|
const U32 remainingNumBytesToCopy = getMin( numBytesLeftInCurrentPacket, numBytesLeftToCopy );
|
||||||
dMemcpy( &buffer[ bufferOffset ], &mCurrentPacket->data[ mCurrentPacketOffset ], numBytesToCopy );
|
dMemcpy( &buffer[ bufferOffset ], &mCurrentPacket->data[ mCurrentPacketOffset ], remainingNumBytesToCopy);
|
||||||
|
|
||||||
bufferOffset += numBytesToCopy;
|
bufferOffset += remainingNumBytesToCopy;
|
||||||
mCurrentPacketOffset += numBytesToCopy;
|
mCurrentPacketOffset += remainingNumBytesToCopy;
|
||||||
numBytesLeftInCurrentPacket -= numBytesToCopy;
|
numBytesLeftInCurrentPacket -= remainingNumBytesToCopy;
|
||||||
numBytesLeftToCopy -= numBytesToCopy;
|
numBytesLeftToCopy -= remainingNumBytesToCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discard the packet if there's no data left.
|
// Discard the packet if there's no data left.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue