Skip to content

Commit

Permalink
[ntuple] fix wrong index being used in RNTupleMerger
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed committed Jul 10, 2024
1 parent 81000c4 commit cecf4c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tree/ntuple/v7/src/RNTupleMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ void ROOT::Experimental::Internal::RNTupleMerger::Merge(std::span<RPageSource *>
// only safe bet is to allocate a buffer big enough to hold as many bytes as the uncompressed
// data.
R__ASSERT(sealedPage.GetBufferSize() < uncompressedSize);
sealedPageBuffers[pageBufferBaseIdx + pageIdx] =
std::make_unique<unsigned char[]>(uncompressedSize);
sealedPage.SetBuffer(sealedPageBuffers[pageIdx].get());
auto &newBuf = sealedPageBuffers[pageBufferBaseIdx + pageIdx];
newBuf = std::make_unique<unsigned char[]>(uncompressedSize);
sealedPage.SetBuffer(newBuf.get());
} else {
// source column range is uncompressed. We can reuse the sealedPage's buffer since it's big
// enough.
Expand Down

0 comments on commit cecf4c6

Please sign in to comment.