Merge branch 'origin/release-2020' into merge-release-2020
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / hackblock.cpp
index bc00ea2c46f1396e4e569fd68738ff2632991791..2459141ae6e9744a00c7369cd8429236ae179b79 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/stringcompare.h"
 
 /* these MUST correspond to the enum in hackblock.h */
 const char* btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
@@ -136,7 +137,7 @@ static int rbonded_find_atoms_in_list(const BondedInteraction&               b,
              * Since we only have the unparsed string here we can only detect
              * EXACT matches (including identical whitespace).
              */
-            if (b.s != it->s)
+            if (b.s == it->s)
             {
                 gmx_warning("Duplicate line found in or between hackblock and rtp entries");
             }