1
0
Fork 0

Fixed erroreous reference to array instead of its element

net->master_{bat,alt} are arrays, but were mistakenly used as
values.

This correctly generated a compilation warning.
This commit is contained in:
Szymon Acedański 2017-01-22 14:16:54 +01:00
parent 4fd89b0b8f
commit f71c20600a

View file

@ -428,8 +428,8 @@ 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-bat", net->master_bat[0] != 0 );
node->setBoolValue( "master-alt", net->master_alt[0] != 0 );
node->setBoolValue( "master-avionics", net->master_avionics > 0 );
node = fgGetNode( "/environment", true );