diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2011-09-26 16:54:16 -0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2011-09-26 16:54:16 -0400 |
commit | 32288c27a523a1152afa019b9152f4401c3097ce (patch) | |
tree | cc9ff73a3b21d1024e4a5ea70a9445750bae965e /klm/lm/bhiksha.hh | |
parent | 5ef94f59e08d2f25bee8520c4233829207d1c034 (diff) |
Fix trie pointer segfault
Diffstat (limited to 'klm/lm/bhiksha.hh')
-rw-r--r-- | klm/lm/bhiksha.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/klm/lm/bhiksha.hh b/klm/lm/bhiksha.hh index ff7fe452..bc705959 100644 --- a/klm/lm/bhiksha.hh +++ b/klm/lm/bhiksha.hh @@ -11,6 +11,7 @@ */ #include <inttypes.h> +#include <assert.h> #include "lm/model_type.hh" #include "lm/trie.hh" @@ -78,6 +79,7 @@ class ArrayBhiksha { util::ReadInt57(base, bit_offset, next_inline_.bits, next_inline_.mask); out.end = ((end_it - offset_begin_) << next_inline_.bits) | util::ReadInt57(base, bit_offset + total_bits, next_inline_.bits, next_inline_.mask); + //assert(out.end >= out.begin); } void WriteNext(void *base, uint64_t bit_offset, uint64_t index, uint64_t value) { |