diff --git a/src/include/OutputFieldsDefault.h b/src/include/OutputFieldsDefault.h index 9f49004b6..0d76bd537 100644 --- a/src/include/OutputFieldsDefault.h +++ b/src/include/OutputFieldsDefault.h @@ -83,6 +83,8 @@ struct BaseOutputFieldItemParams // Returns the next output timestep after the given timestep. int next_out(int timestep) { + if (timestep < out_first) + return out_first; int n_intervals_elapsed = (timestep - out_first) / out_interval; return out_first + out_interval * (n_intervals_elapsed + 1); }