diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b4b3242a..c47ac8287 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change log +## Version 1.4.2 2023-01-20 + +### Fixed + +- Invalid read in coef block for nodes without coefs +- Node count error for negative scales with PBC +- Missing includes resulting in compile errors for recent gcc + + ## Version 1.4.1 2022-01-05 ### Changed @@ -16,7 +25,7 @@ ### Added -- New constructors for BoundingBox and MRA, accepting box=[-L,L] argument +- New constructors for BoundingBox and MRA, accepting box=[-L,L] argument - Add FunctionTree::evalf_precise() which evaluates both scaling and wavelet parts - Possibility for empty tree skeletons without allocated coefficients - Possibility to manually set location of MW filters at configure time @@ -71,7 +80,7 @@ ### Fixed -- Miscellaneous fixes for building on conda-forge +- Miscellaneous fixes for building on conda-forge ## Version 1.3.1 2020-09-02 diff --git a/VERSION b/VERSION index 347f5833e..9df886c42 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.1 +1.4.2 diff --git a/src/trees/FunctionNode.cpp b/src/trees/FunctionNode.cpp index 04016d5de..2c8eee329 100644 --- a/src/trees/FunctionNode.cpp +++ b/src/trees/FunctionNode.cpp @@ -207,7 +207,7 @@ template void FunctionNode::createChildren(bool coefs) { int sIdx = allocator.alloc(nChildren, coefs); auto n_coefs = allocator.getNCoefs(); - auto *coefs_p = allocator.getCoef_p(sIdx); + auto *coefs_p = (coefs) ? allocator.getCoef_p(sIdx) : nullptr; auto *child_p = allocator.getNode_p(sIdx); this->childSerialIx = sIdx; diff --git a/src/trees/FunctionTree.h b/src/trees/FunctionTree.h index 3ff1871df..00c1ab7d0 100644 --- a/src/trees/FunctionTree.h +++ b/src/trees/FunctionTree.h @@ -26,6 +26,7 @@ #pragma once #include +#include #include "MWTree.h" #include "NodeAllocator.h" diff --git a/src/trees/MWTree.cpp b/src/trees/MWTree.cpp index 845514280..7677d944b 100644 --- a/src/trees/MWTree.cpp +++ b/src/trees/MWTree.cpp @@ -211,7 +211,7 @@ template void MWTree::decrementNodeCount(int scale) { assert(-depth - 1 < this->nodesAtNegativeDepth.size()); this->nodesAtNegativeDepth[-depth - 1]--; assert(this->nodesAtNegativeDepth[-depth - 1] >= 0); - if (this->nodesAtNegativeDepth[-depth - 1] == 0 and this->nodesAtNegativeDepth.size() > 1) this->nodesAtNegativeDepth.pop_back(); + if (this->nodesAtNegativeDepth[-depth - 1] == 0 and this->nodesAtNegativeDepth.size() > 0) this->nodesAtNegativeDepth.pop_back(); } else { assert(depth < this->nodesAtDepth.size()); this->nodesAtDepth[depth]--; diff --git a/src/trees/MWTree.h b/src/trees/MWTree.h index 475f4830c..893e492f2 100644 --- a/src/trees/MWTree.h +++ b/src/trees/MWTree.h @@ -26,6 +26,7 @@ #pragma once #include +#include #include "MRCPP/mrcpp_declarations.h" #include "utils/omp_utils.h"