mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 09:51:06 +00:00
nozzle_temperature is variant-expanded, so its length is columns rather than filament slots. On the dynamic-nozzle path that makes it longer than the slot count, and an out-of-slot index reached get_filament_config_index() and came back as filament 0 - the clamp the bounds-checking was meant to remove. Bound by the slot count instead; on the ordinary path the two are equal and nothing changes. The is_extruder_used write gains the matching lower-bound guard. IMEXHelpers.hpp now states both halves of the rule its call sites follow. Bound anything derived from the extruder map against the filament slot count before using it as a filament id, not against the option about to be read. And a miss is -1, which is a correct tool qualifier but matches no physical head, so it cannot serve as a skip-the-primary sentinel: which head prints a filament is answered by the filament and the map, never by a mode role, since a primary-mode print may use any or all tools, one at a time. The consequence is recorded there rather than left implicit. The two skip sites skip nothing for a slot past the end of the map, so a plate with more slots than nozzles double-writes the primary's pressure advance. It is narrow and unreported, and a guard there would be a smaller change than naming a head. The header also records that RepRapFirmware sends an unqualified pressure advance as M572 D0, naming drive 0 absolutely rather than the active tool. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: