File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,7 +282,8 @@ class CoordinateSelector {
282282 } else if (!is_match && isInRun) {
283283 // The end of a run
284284 isInRun = false ;
285- for (auto i=run_idx; i<idx; ++i) {
285+ // Use 1 less than the current index to ensure we get the correct end location.
286+ for (auto i=run_idx; i<idx-1 ; ++i) {
286287 _current_position_increment<T>(current_pos, intervals);
287288 }
288289 // _current_position_stride<T>(current_pos, intervals, idx - run_idx);
@@ -291,6 +292,8 @@ class CoordinateSelector {
291292 for (auto i=0 ; i<current_pos.size (); ++i) {
292293 last_run[i].exclusive_max = current_pos[i].inclusive_min + 1 ;
293294 }
295+ // We need to advance to the actual current position
296+ _current_position_increment<T>(current_pos, intervals);
294297 } else if (!is_match && !isInRun) {
295298 // No run at all
296299 // do nothing TODO: Remove me
@@ -375,6 +378,7 @@ class CoordinateSelector {
375378 // do nothing TODO: Remove me
376379 } else if (!is_match && isInRun) {
377380 // The end of a run
381+ // TODO(BrianMichell): Ensure we are using the correct index (see above)
378382 isInRun = false ;
379383 for (auto i=run_idx; i<idx; ++i) {
380384 _current_position_increment<T>(current_pos, intervals);
You can’t perform that action at this time.
0 commit comments