/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* (depending on \p type) that is partially contained in the group.
* If \p type is not INDEX_RES or INDEX_MOL, this has no effect.
*
- * \p m should have been initialized somehow (calloc() is enough) unless
- * \p type is INDEX_UNKNOWN.
+ * \p m should have been initialized somehow (calloc() is enough).
* \p g should be sorted.
*/
void
{
if (type == INDEX_UNKNOWN)
{
+ sfree(t->a);
+ srenew(t->index, 2);
t->nr = 1;
- snew(t->index, 2);
t->nalloc_index = 2;
t->index[0] = 0;
t->index[1] = 0;