mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-22 18:32:16 +00:00
fix: guard filament_printable read against a short per-filament array (#14695)
This commit is contained in:
@@ -3605,7 +3605,8 @@ std::vector<std::set<int>> Print::get_physical_unprintable_filaments(const std::
|
||||
return physical_unprintables;
|
||||
|
||||
auto get_unprintable_extruder_id = [&](unsigned int filament_idx) -> int {
|
||||
int status = m_config.filament_printable.values[filament_idx];
|
||||
// filament_printable may be shorter than the filament count; get_at() clamps.
|
||||
int status = m_config.filament_printable.get_at(filament_idx);
|
||||
for (int i = 0; i < extruder_num; ++i) {
|
||||
if (!(status >> i & 1)) {
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user