Avoid out-of-bounds array access when checking custom color for TV Remote (#4356)

This commit is contained in:
Stephen Miller
2026-05-04 19:34:33 -05:00
committed by GitHub
parent 6633d7252c
commit 4d3827c349

View File

@@ -201,6 +201,9 @@ public:
controller_override_colors[i] = {r, g, b};
}
static std::optional<Colour> GetControllerCustomColor(s32 i) {
if (i >= controller_override_colors.size()) {
return {};
}
return controller_override_colors[i];
}
};