summaryrefslogtreecommitdiff
path: root/decoder/ff.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-29 20:45:48 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-29 20:45:48 +0000
commit252d628d38b792acbd98e2f74e129994cc9fe3b4 (patch)
treee1556890ebcd67cbaeb21edf62b194f7af50d627 /decoder/ff.cc
parent5677e567a1f1bc098e794440c60164792000b3c5 (diff)
another feature, another POS
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@664 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff.cc')
-rw-r--r--decoder/ff.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/decoder/ff.cc b/decoder/ff.cc
index 7bdd21e3..a32c0dcb 100644
--- a/decoder/ff.cc
+++ b/decoder/ff.cc
@@ -171,7 +171,9 @@ void ModelSet::AddFeaturesToEdge(const SentenceMetadata& smeta,
prob_t* combination_cost_estimate) const {
edge->reset_info();
context->resize(state_size_);
- memset(&(*context)[0], 0, state_size_);
+ if (state_size_ > 0) {
+ memset(&(*context)[0], 0, state_size_);
+ }
SparseVector<double> est_vals; // only computed if combination_cost_estimate is non-NULL
if (combination_cost_estimate) *combination_cost_estimate = prob_t::One();
for (int i = 0; i < models_.size(); ++i) {