From e87d5a0a6a56ddfdb9356297bc0d489dafc6e224 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 8 Jul 2007 04:36:14 +0000 Subject: [PATCH] fixed a small bug where trie replace didn't always work --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401066 --- core/sm_trie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sm_trie.cpp b/core/sm_trie.cpp index df61a740..f3c396a8 100644 --- a/core/sm_trie.cpp +++ b/core/sm_trie.cpp @@ -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;