summaryrefslogtreecommitdiff
path: root/decoder/inside_outside.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-31 01:56:56 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-31 01:56:56 +0000
commitd8fa7f3e9b8127911996c36f477bcae3831f7708 (patch)
treea217daf9c2f7ad02bdc0b2e17e258754b19eec30 /decoder/inside_outside.h
parent2af5a445f3905c69c42be5c758c52a2f21b17446 (diff)
l2r bugfixes
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@635 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/inside_outside.h')
-rw-r--r--decoder/inside_outside.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/inside_outside.h b/decoder/inside_outside.h
index 73d4ec6a..e6289176 100644
--- a/decoder/inside_outside.h
+++ b/decoder/inside_outside.h
@@ -55,7 +55,7 @@ WeightType Inside(const Hypergraph& hg,
*cur_node_inside_score += score;
}
}
- return inside_score.back();
+ return inside_score.empty() ? WeightType(0) : inside_score.back();
}
template<class WeightType, class WeightFunction>