From: David van der Spoel Date: Sat, 28 Jun 2014 07:33:55 +0000 (+0200) Subject: Fixes #1532, SEGV in g_current. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=71144d1dffe57c1ea81e7c76ab941c7192e0cbf1;p=alexxy%2Fgromacs.git Fixes #1532, SEGV in g_current. Unfortunately the tool does not do anything useful at this point in time it seems, it just produces one graph that is non-zero Change-Id: Ie991b8200628253ab308d36cb5afc80138b1acff --- diff --git a/src/tools/gmx_current.c b/src/tools/gmx_current.c index efa25a3d4a..2e5ae17d9a 100644 --- a/src/tools/gmx_current.c +++ b/src/tools/gmx_current.c @@ -728,7 +728,7 @@ static void dielectric(FILE *fmj, FILE *fmd, FILE *outf, FILE *fcur, FILE *mcor, - if (bACF) + if (bACF && (ii < nvfr)) { fprintf(stderr, "Integral and integrated fit to the current acf yields at t=%f:\n", time[vfr[ii]]); fprintf(stderr, "sigma=%8.3f (pure integral: %.3f)\n", sgk-malt*pow(time[vfr[ii]], sigma), sgk); @@ -763,7 +763,7 @@ static void dielectric(FILE *fmj, FILE *fmd, FILE *outf, FILE *fcur, FILE *mcor, } else { - fprintf(stderr, "Too less points for a fit.\n"); + fprintf(stderr, "Too few points for a fit.\n"); }