Skip to content

Commit

Permalink
Merge pull request #881 from openzim/fix_shared_ptr_array
Browse files Browse the repository at this point in the history
Fix creation of shared_ptr<char> in test.
  • Loading branch information
kelson42 authored Apr 29, 2024
2 parents 8559e22 + 436f351 commit 51b8a4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ TEST(ZimArchive, openZIMFileMultiPartEmbeddedInAnotherFile)
zim::Blob readItemData(const zim::Item::DirectAccessInfo& dai, zim::size_type size)
{
zim::DEFAULTFS::FD fd(zim::DEFAULTFS::openFile(dai.first));
std::shared_ptr<char> data(new char[size]);
std::shared_ptr<char> data(new char[size], std::default_delete<char[]>());
fd.readAt(data.get(), zim::zsize_t(size), zim::offset_t(dai.second));
return zim::Blob(data, size);
}
Expand Down

0 comments on commit 51b8a4d

Please sign in to comment.