mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-12 03:27:55 +00:00
Fix uninitialized first_layer_time on CLI-sliced 3MF (#13429)
PartPlate::store_to_3mf_structure read first_layer_time from the indirect cali_bboxes_data struct, which the GUI populates at Plater.cpp:10600 but the CLI never writes to. The result was uninitialized memory leaking into slice_info.config Read directly from get_slice_result()->initial_layer_time, which is populated by GCodeProcessor::finalize() in both code paths and matches the pattern already used a few lines above for gcode_prediction. Also default-initialize PlateBBoxData::first_layer_time to 0.0f as a defense against any other consumer reading it without an explicit write.
This commit is contained in:
@@ -78,7 +78,7 @@ struct PlateBBoxData
|
||||
int first_extruder = 0;
|
||||
float nozzle_diameter = 0.4;
|
||||
std::string bed_type;
|
||||
float first_layer_time;
|
||||
float first_layer_time = 0.0f;
|
||||
// version 1: use view type ColorPrint (filament color)
|
||||
// version 2: use view type FilamentId (filament id)
|
||||
int version = 2;
|
||||
|
||||
Reference in New Issue
Block a user