Skip to content

Commit

Permalink
Fix memory allocation in UtilsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
zenden2k committed Jun 30, 2023
1 parent 7d58c37 commit 1016c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Images/Tests/UtilsTest.cpp
Expand Up @@ -57,7 +57,7 @@ TEST_F(UtilsTest, GetThumbnail) {
ASSERT_TRUE(IuCoreUtils::FileExists(fileName));
int fileSize = static_cast<int>(IuCoreUtils::GetFileSize(fileName));
ASSERT_GT(fileSize, 0);
auto data = std::make_unique<uint8_t>(fileSize);
auto data = std::make_unique<uint8_t[]>(fileSize);
FILE *f = IuCoreUtils::FopenUtf8(fileName.c_str(), "rb");
size_t bytesRead = fread(data.get(), 1, fileSize, f);
ASSERT_EQ(fileSize, bytesRead);
Expand Down

0 comments on commit 1016c70

Please sign in to comment.