From 952b83acc20f71fb8e381f3b572fcf6c58410431 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Fri, 30 Aug 2024 13:13:18 +0100 Subject: [PATCH] Update input.cc --- input.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input.cc b/input.cc index fee71c357..9d15b5be0 100644 --- a/input.cc +++ b/input.cc @@ -815,7 +815,7 @@ void read_atomicdata_files() { // store the ions data to memory and set up the ions zeta and levellist globals::elements[element].ions[ion] = { - .levels = static_cast(malloc(nlevelsmax * sizeof(EnergyLevel))), + .levels = static_cast(calloc(nlevelsmax, sizeof(EnergyLevel))), .ionstage = ionstage, .nlevels = nlevelsmax, .nlevels_nlte = 0,