mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
fix segfault in StaticData.cpp
This commit is contained in:
parent
7df9726788
commit
b51c5668f5
@ -423,8 +423,14 @@ LoadDecodeGraphsOld(const vector<string> &mappingVector,
|
||||
if (m_decodeGraphs.size() < decodeGraphInd + 1) {
|
||||
DecodeGraph *decodeGraph;
|
||||
if (is_syntax(m_options->search.algo)) {
|
||||
size_t maxChartSpan = (decodeGraphInd < maxChartSpans.size()) ? maxChartSpans[decodeGraphInd] : DEFAULT_MAX_CHART_SPAN;
|
||||
VERBOSE(1,"max-chart-span: " << maxChartSpans[decodeGraphInd] << endl);
|
||||
size_t maxChartSpan;
|
||||
if (decodeGraphInd < maxChartSpans.size()) {
|
||||
maxChartSpan = maxChartSpans[decodeGraphInd];
|
||||
VERBOSE(1,"max-chart-span: " << maxChartSpans[decodeGraphInd] << endl);
|
||||
}
|
||||
else {
|
||||
maxChartSpan = DEFAULT_MAX_CHART_SPAN;
|
||||
}
|
||||
decodeGraph = new DecodeGraph(m_decodeGraphs.size(), maxChartSpan);
|
||||
} else {
|
||||
decodeGraph = new DecodeGraph(m_decodeGraphs.size());
|
||||
|
Loading…
Reference in New Issue
Block a user