diff --git a/src/include/OutputFieldsDefault.h b/src/include/OutputFieldsDefault.h index 907acf2e5..f1e672e2d 100644 --- a/src/include/OutputFieldsDefault.h +++ b/src/include/OutputFieldsDefault.h @@ -114,9 +114,11 @@ class OutputFieldsItem : public OutputFieldsItemParams pfield_next_ = timestep + pfield_interval; tfield_next_ = timestep + tfield_interval; - tfield_next_ = timestep / tfield_interval * tfield_interval; - if (timestep % tfield_interval > 0) - tfield_next_ += tfield_interval; + if (tfield_interval > 0) { + tfield_next_ = timestep / tfield_interval * tfield_interval; + if (timestep % tfield_interval > 0) + tfield_next_ += tfield_interval; + } } }