Fixes #882 - looping bug in trxio.c
[alexxy/gromacs.git] / src / gmxlib / trxio.c
index 9874339d3e61adfcccf238f1721ea29573d11b68..d9db7f0f50288fc2c4a81821d614df0a42d73d68 100644 (file)
@@ -712,8 +712,9 @@ gmx_bool read_next_frame(const output_env_t oenv,t_trxstatus *status,t_trxframe
        * accuracy of the control over -b and -e options.
        */
         if (bTimeSet(TBEGIN) && (fr->time < rTimeValue(TBEGIN))) {
-            if (xtc_seek_time(status->fio, rTimeValue(TBEGIN),fr->natoms)) {
-                gmx_fatal(FARGS,"Specified frame doesn't exist or file not seekable");
+          if (xtc_seek_time(status->fio, rTimeValue(TBEGIN),fr->natoms,TRUE)) {
+            gmx_fatal(FARGS,"Specified frame (time %f) doesn't exist or file corrupt/inconsistent.",
+                      rTimeValue(TBEGIN));
             }
             initcount(status);
         }