Fix that skipping fails if target is 2nd frame
authorRoland Schulz <roland@utk.edu>
Sat, 14 Jun 2014 03:39:20 +0000 (23:39 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 17 Jun 2014 15:19:50 +0000 (17:19 +0200)
commitbda9ffdf608c090e6338ecf68875ee2c10783416
tree6ab250e15d7c4b755d620b8c6b73c3aa32407115
parent79f730b0edb541921ec3cc43004a86882ca79017
Fix that skipping fails if target is 2nd frame

With bSeekForwardOnly the current file position should be an inclusive boundary,
but because the binary search stops if the search region (high-low) becomes
header_size, the current frame wasn't found. Because trjconv always reads the
first frame before calling seek, it failed if the target was the 2nd frame.

Fixes #1154

Change-Id: Id4151f0106abdb68d6067f02fe2927a4ec6d77a0
src/gmxlib/libxdrf.c