Cast buffer ptr before bitwise op

This commit is contained in:
Atlante45 2015-07-30 01:02:53 -07:00
parent da480bcaf0
commit 3d523552f8

View file

@ -138,7 +138,7 @@ void Socket::readPendingDatagrams() {
}
// check if this was a control packet or a data packet
bool isControlPacket = *buffer & CONTROL_BIT_MASK;
bool isControlPacket = *reinterpret_cast<uint32_t*>(buffer.get()) & CONTROL_BIT_MASK;
if (isControlPacket) {
// setup a control packet from the data we just read