From 8a1f305cc71135003ef78c919787bbc2865f77af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Mon, 16 Oct 2023 19:17:04 +0200 Subject: [PATCH] Fix incorrect header size --- CMakeLists.txt | 2 +- libxisf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86e768c..bb1580d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.14) -project(libXISF VERSION 0.2.9 LANGUAGES CXX C +project(libXISF VERSION 0.2.10 LANGUAGES CXX C HOMEPAGE_URL https://gitea.nouspiro.space/nou/libXISF DESCRIPTION "LibXISF is C++ library that can read and write XISF files produced by PixInsight.") diff --git a/libxisf.cpp b/libxisf.cpp index a98090d..935588c 100644 --- a/libxisf.cpp +++ b/libxisf.cpp @@ -957,7 +957,7 @@ void XISFWriterPrivate::writeHeader() offset += image._dataBlock.data.size(); } - uint32_t headerSize = size - sizeof(signature); + uint32_t headerSize = header.size() - sizeof(signature); header.resize(size, 0); header.replace(8, sizeof(uint32_t), (const char*)&headerSize, sizeof(uint32_t));