From 71144d1dffe57c1ea81e7c76ab941c7192e0cbf1 Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Sat, 28 Jun 2014 09:33:55 +0200 Subject: [PATCH] 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 --- src/tools/gmx_current.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); } -- 2.22.0