summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-04-23 00:45:03 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-04-23 00:45:03 -0400
commit9908eb169f40d32231454b62d5c150fcf4863d58 (patch)
treee338beeb7ca56b6a0015d572cf520a586e13f16a
parent8db008b5633f4c0495c1f78528b7b04f038e5153 (diff)
make sure state is initialized properly
-rw-r--r--decoder/ff_klm.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc
index 62908cdc..cc7cd427 100644
--- a/decoder/ff_klm.cc
+++ b/decoder/ff_klm.cc
@@ -297,6 +297,7 @@ class KLanguageModelImpl {
// special handling of beginning / ending sentence markers
dummy_state_ = new char[state_size_];
+ memset(dummy_state_, 0, state_size_);
dummy_ants_.push_back(dummy_state_);
dummy_ants_.push_back(NULL);
dummy_rule_.reset(new TRule("[DUMMY] ||| [BOS] [DUMMY] ||| [1] [2] </s> ||| X=0"));