Skip to content
Snippets Groups Projects
Commit d2b5e59c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'logger_fix_final_time' into 'master'

Fix reading time at t=t final

Closes #739

See merge request !1297
parents 4bee9657 b6e6c832
No related branches found
No related tags found
1 merge request!1297Fix reading time at t=t final
......@@ -156,6 +156,11 @@ void logger_reader_set_time(struct logger_reader *reader, double time) {
}
}
/* Deal with the final time */
if (left == (unsigned int) reader->index.n_files - 1) {
left -= 1;
}
/* Generate the filename */
char filename_prev[STRING_SIZE + 50];
sprintf(filename_prev, "%s_%04u.index", reader->basename, left);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment