Fix default enum values in help output
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 16 Feb 2014 04:48:39 +0000 (06:48 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 16 Feb 2014 09:30:47 +0000 (10:30 +0100)
commit64fd20de16e5ea975b1064ba0cc8b9b252eea1e8
tree88aa3d872f56167844a70771dce4f08648ace03a
parent0285c365da71173492da24b9c6d848c37fe9b484
Fix default enum values in help output

nenum() does not return an enum value, but an index into the underlying
array, which means that the first element is 1 and not zero like the
code assumed.  The help output was off-by-one, and could error out if
some environment variable was set that was affecting the help output.

Fixes #1438.

Change-Id: Iec2f05c9ced55868902069ce59bc4979a6879f86
src/gromacs/commandline/pargs.cpp