fix(cpn): Size of the YamlStickConfig struct was set wrong (#2891)
The YamlStickConfig definition was defined and sized with CPN_MAX_SWITCHES (32) instead of CPN_MAX_STICKS (4). When loading radio.yml this would overwrite 112 bytes past the end of the stickName array in the GeneralSettings class.
This commit is contained in:
@@ -46,7 +46,7 @@ struct YamlNameConfig {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef YamlNameConfig<CPN_MAX_SWITCHES, YamlStickLookup> YamlStickConfig;
|
typedef YamlNameConfig<CPN_MAX_STICKS, YamlStickLookup> YamlStickConfig;
|
||||||
|
|
||||||
template <unsigned int N, class name_lookup, const YamlLookupTable& cfg_lut>
|
template <unsigned int N, class name_lookup, const YamlLookupTable& cfg_lut>
|
||||||
struct YamlKnobConfig : public YamlNameConfig<N, name_lookup> {
|
struct YamlKnobConfig : public YamlNameConfig<N, name_lookup> {
|
||||||
|
|||||||
Reference in New Issue
Block a user