From 6cdac5eb4c56d8dec4a7ad05772b82853829839a Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 21 Aug 2011 16:08:52 +0000 Subject: [PATCH] Fixed a bug in SP_Add. git-svn-id: svn://svn.cc65.org/cc65/trunk@5246 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/strpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/strpool.c b/src/common/strpool.c index 12623b25c..963ecaf0a 100644 --- a/src/common/strpool.c +++ b/src/common/strpool.c @@ -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,7 @@ unsigned SP_GetCount (const StringPool* P) /* Return the number of strings in the pool */ { return CollCount (&P->Entries); -} +} -- 2.39.5