From 60f679d51e25d566011a3a292e30984d48e503be Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 14 Feb 2019 16:15:58 -0500 Subject: [PATCH] Fix external source indexing bug for distrib temps --- src/source.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/source.cpp b/src/source.cpp index 3997c3cc0..0e23bb3dd 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -173,7 +173,8 @@ Bank SourceDistribution::sample() const if (space_box->only_fissionable()) { // Determine material auto c = model::cells[cell_index - 1]; - int32_t mat_index = c->material_[instance]; + auto mat_index = c->material_.size() == 1 + ? c->material_[0] : c->material_[instance]; if (mat_index == MATERIAL_VOID) { found = false;