vsiteatoms array was one to short
Fixes #997
Change-Id: I0897694dfc431a20bd1ebf769b24d09038d588b2
#include <stdio.h>
#include <math.h>
+#include <assert.h>
#include <string.h>
#include "vsite_parm.h"
#include "smalloc.h"
{
int ftype,i,parnr,k,l,m,n,nvsite,kept_i,vsnral;
atom_id atom,constr;
- atom_id vsiteatoms[3];
+ atom_id vsiteatoms[4];
gmx_bool bKeep,bUsed,bPresent;
t_params *ps;
if (nvsite==1) {
/* store construction atoms of first vsite */
vsnral=NRAL(pindex[atom].ftype)-1;
+ assert(vsnral<=4);
for(m=0; (m<vsnral); m++)
vsiteatoms[m]=
plist[pindex[atom].ftype].param[pindex[atom].parnr].a[m+1];