fixed a small bug where trie replace didn't always work

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401066
This commit is contained in:
David Anderson 2007-07-08 04:36:14 +00:00
parent aff0841bf4
commit e87d5a0a6a

View File

@ -623,7 +623,7 @@ bool sm_trie_add(Trie *trie, const char *key, void *value, bool replace_allowed)
/* Do an initial browsing to make sure they're not the same string */
if (strcmp(keyptr, term) == 0)
{
if (!node->valset)
if (!node->valset || replace_allowed)
{
node->valset = true;
node->value = value;