Skip to content

Commit d1137ee

Browse files
committed
BUG: Check output "dt" separately from "type", allows us to make sure each type has a dt
> Otherwise, there are out-of-range json errors with mo more info.
1 parent 194853b commit d1137ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/inputs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,13 @@ std::vector<std::string> Inputs::get_omniweb_files() {
547547

548548
precision_t Inputs::get_dt_output(int iOutput) {
549549
precision_t value = 0.0;
550-
int nOutputs = settings.at("Outputs").at("type").size();
550+
int nOutputs = settings.at("Outputs").at("dt").size();
551551

552552
if (iOutput < nOutputs)
553553
value = settings.at("Outputs").at("dt").at(iOutput);
554+
else{
555+
report.error("Output Error; more output types than dt's provided.");
556+
}
554557

555558
return value;
556559
}

0 commit comments

Comments
 (0)