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:
parent
aff0841bf4
commit
e87d5a0a6a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user