From cdbb5934d7522e2e9c966fbfdcaa8d0647bc2c1c Mon Sep 17 00:00:00 2001 From: Nick Cano Date: Tue, 14 Jun 2016 18:33:10 -0700 Subject: Evaluation order in this case is unspecified On Visual C++ 2010, the `++current` was being evaluated before `[*current]`, causing a deref of `end` and a crash.--- src/trie.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3