fix: Potential out of bounds access of flightmode name on main screen (#1337)
Take 2, without the Mac Companion breakage... * fixed incorrect use of non-terminated-fixed-string for ctor of std::string * introduced helper * removed commented lines * removed constexpr since in C++11 std::string ctro isn't still constexpr Co-authored-by: wimalopaan <wilhelm.wm.meier@googlemail.com>
This commit is contained in:
co-authored by
wimalopaan
parent
0adb6315c8
commit
121a1ffee5
@@ -328,8 +328,8 @@ void ViewMainDecoration::createFlightMode()
|
||||
};
|
||||
|
||||
std::function<std::string()> getFM = []() -> std::string {
|
||||
return g_model.flightModeData[mixerCurrentFlightMode].name;
|
||||
};
|
||||
return stringFromNtString(g_model.flightModeData[mixerCurrentFlightMode].name);
|
||||
};
|
||||
|
||||
flightMode = new DynamicText(this, r, getFM, CENTERED | COLOR_THEME_SECONDARY1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user