writer: the temporary file name is defined when the arm date is missing

tmp_suffix was left uninitialised and only assigned inside the `if
(!arm_date.empty())` body or in the catch handler. An empty arm_date takes
neither path, so the `.tmp` file name was formatted from an indeterminate value.
Initialise it to the same wall-clock fallback the catch handler already uses.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GxZqDiFP3KqriBhNdcR56
This commit is contained in:
2026-09-13 14:34:12 +02:00
co-authored by Claude Opus 5
parent 7dc749fb31
commit 94c5437885
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ declared_pixel_signed(msg.pixel_signed) {
exptime.reserve(images_per_file);
number.reserve(images_per_file);
uint64_t tmp_suffix;
uint64_t tmp_suffix = std::chrono::system_clock::now().time_since_epoch().count();
try {
if (!msg.arm_date.empty())
tmp_suffix = parse_UTC_to_ms(msg.arm_date);