aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/trie.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/trie.h b/src/trie.h
index d34912f..1fa698e 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -77,7 +77,8 @@ class Trie {
typename key_list::const_iterator end
) {
if ( current != end ) {
- return this->children_[*current].add(++current, end);
+ auto element = *current;
+ return this->children_[element].add(++current, end);
} else {
return this;
}