diff --git a/src/FDM/JSBSim/FGFDMExec.cpp b/src/FDM/JSBSim/FGFDMExec.cpp index 8552a519c..714e5d184 100644 --- a/src/FDM/JSBSim/FGFDMExec.cpp +++ b/src/FDM/JSBSim/FGFDMExec.cpp @@ -211,7 +211,7 @@ FGFDMExec::~FGFDMExec() SetGroundCallback(0); - if (FDMctr > 0) (*FDMctr)--; + if (FDMctr != 0) (*FDMctr)--; Debug(1); } diff --git a/src/FDM/JSBSim/input_output/FGInputSocket.cpp b/src/FDM/JSBSim/input_output/FGInputSocket.cpp index 3eef2382c..2f1f9ee5d 100644 --- a/src/FDM/JSBSim/input_output/FGInputSocket.cpp +++ b/src/FDM/JSBSim/input_output/FGInputSocket.cpp @@ -192,7 +192,7 @@ void FGInputSocket::Read(bool Holding) } else { socket->Reply("Must be in HOLD to search properties\n"); } - } else if (node > 0) { + } else { ostringstream buf; buf << argument << " = " << setw(12) << setprecision(6) << node->getDoubleValue() << endl; socket->Reply(buf.str()); diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 19a1a482d..81ad1866f 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -428,10 +428,10 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, // node->setDoubleValue( net->brake_right ); node = fgGetNode( "/controls/switches", true ); - node->setBoolValue( "master-bat", net->master_bat > 0 ); - node->setBoolValue( "master-alt", net->master_alt > 0); - node->setBoolValue( "master-avionics", net->master_avionics > 0); - + node->setBoolValue( "master-bat", net->master_bat != 0 ); + node->setBoolValue( "master-alt", net->master_alt != 0 ); + node->setBoolValue( "master-avionics", net->master_avionics > 0 ); + node = fgGetNode( "/environment", true ); node->setDoubleValue( "wind-speed-kt", net->wind_speed_kt ); node->setDoubleValue( "wind-from-heading-deg", net->wind_dir_deg );