Fix MK-VIII GPWS crash caused by getStringValue
Change local variable storage to a string, to avoid a crash in this code detected by ASan.
This commit is contained in:
parent
7d3f511560
commit
af0df69126
1 changed files with 2 additions and 4 deletions
|
@ -1129,10 +1129,8 @@ MK_VIII::IOHandler::update_inputs ()
|
||||||
mk_dinput(glideslope_inhibit) = mk_node(nav0_gs_distance)->getDoubleValue() < 0;
|
mk_dinput(glideslope_inhibit) = mk_node(nav0_gs_distance)->getDoubleValue() < 0;
|
||||||
if (mk_dinput_feed(autopilot_engaged))
|
if (mk_dinput_feed(autopilot_engaged))
|
||||||
{
|
{
|
||||||
const char *mode;
|
const auto mode = mk_node(autopilot_heading_lock)->getStringValue();
|
||||||
|
mk_dinput(autopilot_engaged) = !mode.empty();
|
||||||
mode = mk_node(autopilot_heading_lock)->getStringValue().c_str();
|
|
||||||
mk_dinput(autopilot_engaged) = mode && *mode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mk_ainput_feed(uncorrected_barometric_altitude))
|
if (mk_ainput_feed(uncorrected_barometric_altitude))
|
||||||
|
|
Loading…
Add table
Reference in a new issue