mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix mismatched deallocator in FileClassifier.cpp
This commit is contained in:
@@ -103,7 +103,8 @@ static bool TryClassifyAsS4(IStream * stream, ClassifiedFileInfo * result)
|
||||
try
|
||||
{
|
||||
size_t dataLength = (size_t)stream->GetLength();
|
||||
std::unique_ptr<uint8> data(stream->ReadArray<uint8>(dataLength));
|
||||
auto deleter_lambda = [dataLength](uint8 * ptr) { Memory::FreeArray(ptr, dataLength); };
|
||||
std::unique_ptr<uint8, decltype(deleter_lambda)> data(stream->ReadArray<uint8>(dataLength), deleter_lambda);
|
||||
stream->SetPosition(originalPosition);
|
||||
sint32 fileTypeVersion = sawyercoding_detect_file_type(data.get(), dataLength);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user