]> git.sur5r.net Git - cc65/blobdiff - src/common/strpool.c
Merge remote-tracking branch 'upstream/master' into a5200
[cc65] / src / common / strpool.c
index 12623b25c7b6858f345c8bf3b5ae791f37ca8650..c5661be75bca90f807ad89015e0283455a2d6d63 100644 (file)
@@ -236,7 +236,7 @@ unsigned SP_Add (StringPool* P, const StrBuf* S)
     StringPoolEntry* E = HT_Find (&P->Tab, S);
 
     /* Did we find it? */
-    if (E != 0) {
+    if (E == 0) {
 
         /* We didn't find the entry, so create a new one */
         E = NewStringPoolEntry (S, CollCount (&P->Entries));
@@ -280,7 +280,4 @@ unsigned SP_GetCount (const StringPool* P)
 /* Return the number of strings in the pool */
 {
     return CollCount (&P->Entries);
-}                 
-
-
-
+}