Commit a9510a8cba1ed515ecba4c9960c88e027f9aab6f
1 parent
966af096
Exists in
master
and in
97 other branches
Fix sum in range process (#6140)
Showing
2 changed files
with
3 additions
and
5 deletions
Show diff stats
src/ExternLib/sum_into_table_range/SumIntoTableRange.hh
... | ... | @@ -265,10 +265,8 @@ public: |
265 | 265 | ParamData* ltableParamInput = crtParam->getParamData(&_process).get(); |
266 | 266 | |
267 | 267 | //Retrieve related index for this "table" parameter |
268 | - unsigned int crtTimeTableParamIndex = ltableParamInput->getIndexInfo()._startIndex; | |
269 | - for (unsigned int tableParamindex = ltableParamInput->getIndexInfo()._startIndex ; | |
270 | - tableParamindex < ltableParamInput->getIndexInfo()._startIndex + ltableParamInput->getIndexInfo()._nbDataToProcess; | |
271 | - ++tableParamindex) { | |
268 | + unsigned int crtTimeTableParamIndex = 0; | |
269 | + for (unsigned int tableParamindex = 0 ; tableParamindex < ltableParamInput->getDataNumber(); ++tableParamindex) { | |
272 | 270 | if (crtTime < ltableParamInput->getTime(tableParamindex)) |
273 | 271 | break; |
274 | 272 | crtTimeTableParamIndex = tableParamindex; | ... | ... |
src/Info/ParamTable.cc
... | ... | @@ -193,7 +193,7 @@ t_TableBound ParamBoundsTable::getBound(ParameterManager *parameterManager, unsi |
193 | 193 | |
194 | 194 | std::vector<double> boundsValues = getTableParamValuesByKey(parameterManager, paramsTableData, ParamBoundsTable::_boundsParamKey); |
195 | 195 | |
196 | - if (index >= boundsValues.size() - 1) | |
196 | + if (boundsValues.empty() || (index >= boundsValues.size() - 1)) | |
197 | 197 | { |
198 | 198 | LOG4CXX_ERROR(_logger, "Index " << index << " outside of table definition => Cannot get real bound" ); |
199 | 199 | bound.min = index; | ... | ... |