Also, small fixes to generic protocol from AndersG
//////////////////////////////////////////////////
// Read the receive socket and process any data
//////////////////////////////////////////////////
- size_t bytes;
+ ssize_t bytes;
do {
MsgBuf msgBuf;
//////////////////////////////////////////////////
perror("FGMultiplayMgr::MP_ProcessData");
break;
}
- if (bytes <= sizeof(T_MsgHdr)) {
+ if (bytes <= static_cast<ssize_t>(sizeof(T_MsgHdr))) {
SG_LOG( SG_NETWORK, SG_ALERT, "FGMultiplayMgr::MP_ProcessData - "
<< "received message with insufficient data" );
break;
if (binary_byte_order == BYTE_ORDER_MATCHES_NETWORK_ORDER) {
*((int32_t*)&buf[length]) = (int32_t)fixed;
} else {
- *((uint32_t*)&buf[length]) = sg_bswap_32((uint32_t)val);
+ *((uint32_t*)&buf[length]) = sg_bswap_32((uint32_t)fixed);
}
length += sizeof(int32_t);
break;
break;
case FG_FIXED:
+ case FG_FLOAT:
case FG_DOUBLE:
val = _in_message[i].offset + strtod(p1, 0) * _in_message[i].factor;
_in_message[i].prop->setFloatValue((float)val);