Fix resizing of sample loss vector in aalcalc when sample size is 1
Following the introduction of the Average Loss Convergence Table (ALCT) in ktools v3.9.0 (see PR https://github.com/OasisLMF/ktools/pull/301 for more details) a bug was introduced where the sample loss vector in aalcalc would not be resized when sample size is 1 and the ALCT output was not requested on the command line. Under these circumstances, an attempt to write beyond the scope of the vector would be made, which would throw a segmentation fault. The logic behind resizing the sample loss vector has been changed, thus fixing this issue.
Fix resizing of sample loss vector in aalcalc when sample size is 1
Following the introduction of the Average Loss Convergence Table (ALCT) in ktools v3.9.0 (see PR https://github.com/OasisLMF/ktools/pull/301 for more details) a bug was introduced where the sample loss vector in
aalcalc
would not be resized when sample size is 1 and the ALCT output was not requested on the command line. Under these circumstances, an attempt to write beyond the scope of the vector would be made, which would throw a segmentation fault. The logic behind resizing the sample loss vector has been changed, thus fixing this issue.