From 2da0ecb96b0f31197f91ab65b9abb7744ae1bef9 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 23 Apr 2011 00:45:03 -0400 Subject: make sure state is initialized properly --- decoder/ff_klm.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'decoder/ff_klm.cc') 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] ||| X=0")); -- cgit v1.2.3