mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-22 20:55:16 +00:00
ENH:Add an array out of bounds protection
jira: none Change-Id: I57f401d368191aec8a6687158e0c50c455429893 (cherry picked from commit 4e3ee050db33be341266f8635721c1f92f8ca0f5)
This commit is contained in:
@@ -3010,8 +3010,12 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||||||
}
|
}
|
||||||
for (size_t i = 0; i < sync_ams_badges.size(); i++) {
|
for (size_t i = 0; i < sync_ams_badges.size(); i++) {
|
||||||
if (sync_ams_badges[i] == true) {
|
if (sync_ams_badges[i] == true) {
|
||||||
|
if (i < p->combos_filament.size()) {
|
||||||
auto &c = p->combos_filament[i];
|
auto &c = p->combos_filament[i];
|
||||||
badge_combox_filament(c);
|
badge_combox_filament(c);
|
||||||
|
} else {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << "check error: p->combos_filament array out of bound";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user