Parcourir la source

CHash: fix bug in Insert() to detect existing entry. This affected NCDInterpProg which made it unable to
detect processes/templated with the same name.

ambrop7 il y a 13 ans
Parent
commit
1ab2d67d30
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      structure/CHash_impl.h

+ 1 - 1
structure/CHash_impl.h

@@ -115,8 +115,8 @@ static int CHash_Insert (CHash *o, CHashArg arg, CHashRef entry, CHashRef *out_e
         if (CHASH_PARAM_COMPARE_ENTRIES(arg, cur, entry)) {
             if (out_existing) {
                 *out_existing = cur;
-                return 0;
             }
+            return 0;
         }
         link = CHash_next(cur);
     }