Fix initializing empty tables

This commit is contained in:
Matthias Hochsteger 2024-04-02 23:34:12 +02:00
parent 451e59afa2
commit 5c38bef3cf

View File

@ -120,7 +120,7 @@ public:
/// Creates fixed maximal element size table /// Creates fixed maximal element size table
inline TABLE (const NgFlatArray<int,BASE> & entrysizes) inline TABLE (const NgFlatArray<int,BASE> & entrysizes)
: BASE_TABLE (NgFlatArray<int> (entrysizes.Size(), const_cast<int*>(&entrysizes[BASE])), : BASE_TABLE (NgFlatArray<int> (entrysizes.Size(), entrysizes.Size() ? const_cast<int*>(&entrysizes[BASE]) : nullptr),
sizeof(T)) sizeof(T))
{ ; } { ; }