diff --git a/libsrc/core/table.hpp b/libsrc/core/table.hpp index ad0c73a1..62c6e5b9 100644 --- a/libsrc/core/table.hpp +++ b/libsrc/core/table.hpp @@ -171,7 +171,19 @@ namespace ngcore void DoArchive(Archive& ar) { ar & size; + if(size == 0) + return; + if(ar.Input()) + { + index = new IndexType[size+1]; + mt.Alloc(sizeof(IndexType) * (size+1)); + } ar.Do(index, size+1); + if(ar.Input()) + { + data = new T[index[size]]; + mt.Alloc(sizeof(T) * index[size]); + } ar.Do(data, index[size]); }