Added demowriter check for num bits written being a multiple of 8
This commit is contained in:
parent
b0e5506384
commit
9696646576
@ -62,6 +62,11 @@ void DemoWriter::EndCommandPacket(const PacketTrailingBits& trailingBits)
|
||||
{
|
||||
m_cmdPacketBuf.WriteUBitLong(trailingBits.value, trailingBits.numTrailingBits);
|
||||
}
|
||||
const int numBitsToWrite = m_cmdPacketBuf.GetNumBitsWritten() % 8;
|
||||
if (numBitsToWrite != 0)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
if (m_cmdPacketBuf.GetNumBytesWritten() > 0)
|
||||
{
|
||||
m_writer.WriteRawData(m_cmdPacketBuf.GetBasePointer(), m_cmdPacketBuf.GetNumBytesWritten());
|
||||
|
Loading…
Reference in New Issue
Block a user