diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m index 0b8e06d7a..6fbd11886 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m @@ -21,7 +21,7 @@ - (NSData *)data { Byte headerBytes[V1PROTOCOL_HEADERSIZE] = {0}; Byte version = (self.version & 0xF) << 4; // first 4 bits - Byte compressed = self.compressed?1:0 << 3; // next 1 bit + Byte compressed = (self.compressed?1:0) << 3; // next 1 bit Byte frameType = (self.frameType & 0x7); // last 3 bits headerBytes[0] = version | compressed | frameType; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m index b2b00ed46..adb8a9b63 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m @@ -21,7 +21,7 @@ - (NSData *)data { Byte headerBytes[V2PROTOCOL_HEADERSIZE] = {0}; Byte version = (self.version & 0xF) << 4; // first 4 bits - Byte compressed = self.compressed?1:0 << 3; // next 1 bit + Byte compressed = (self.compressed?1:0) << 3; // next 1 bit Byte frameType = (self.frameType & 0x7); // last 3 bits headerBytes[0] = version | compressed | frameType;