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));