Fixed output of eigenvalues in g_covar. Fixes #1575
authorCarsten Kutzner <ckutzne@gwdg.de>
Fri, 15 Aug 2014 14:44:44 +0000 (16:44 +0200)
committerCarsten Kutzner <ckutzne@gwdg.de>
Fri, 15 Aug 2014 15:18:14 +0000 (17:18 +0200)
commit0a27e96b15d7ea4cfffa179512cc858123e91d7b
treee8bc38a678695f9bb0a4cf8eea9948e8d958abba
parent909f8293c8fbbd416d16b793b61322ab0344664f
Fixed output of eigenvalues in g_covar. Fixes #1575

Commit 972032bfb8cd38 introduced a bug that would lead to eigenvalues
only written to .xvg file if "-last" is explicitly stated on the
command line. Otherwise no eigenvalues would appear in the .xvg file.
The eigenvalues are written in a loop from '0' to 'end', but since
'end' is initialized with '-1', the loop would never be executed.
This patch moves the code that computes 'end' one block upwards
before the output to file.

Change-Id: I738c9dd77ff9e6e2daae89b6d2063755dfba88af
src/tools/gmx_covar.c