Skip to content

Commit 0911f0a

Browse files
committed
fix bug in compact lookup that prevented merging with higher chunks
1 parent 306fa9c commit 0911f0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Common/CompactLookup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace cifti
136136
return m_chunks[high - 1].elements[index - m_chunks[high - 1].start];
137137
}
138138
if (high > 0 && m_chunks[high - 1].start + (int64_t)(m_chunks[high - 1].elements.size()) == index) attach_low = true;//index is 1 beyond the range
139-
if (high < numChunks && m_chunks[high].start + 1 == index) attach_high = true;//index is 1 before the next range
139+
if (high < numChunks && m_chunks[high].start == index + 1) attach_high = true;//index is 1 before the next range
140140
if (attach_low)
141141
{
142142
std::vector<T>& lowvec = m_chunks[high - 1].elements;

0 commit comments

Comments
 (0)