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:
philmoz
2022-12-20 08:59:55 +10:00
committed by GitHub
parent 37779a5aaf
commit 2133d42bd2
@@ -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>
struct YamlKnobConfig : public YamlNameConfig<N, name_lookup> {