aboutsummaryrefslogtreecommitdiff
path: root/zencore/compactbinarypackage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/compactbinarypackage.cpp')
-rw-r--r--zencore/compactbinarypackage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/compactbinarypackage.cpp b/zencore/compactbinarypackage.cpp
index 9eb67ac93..f84137ff6 100644
--- a/zencore/compactbinarypackage.cpp
+++ b/zencore/compactbinarypackage.cpp
@@ -145,7 +145,7 @@ CbAttachment::Load(BinaryReader& Reader, BufferAllocator Allocator)
std::vector<uint8_t> HashBuffer;
CbField HashField = LoadCompactBinary(Reader, [&HashBuffer](uint64_t Size) -> UniqueBuffer {
HashBuffer.resize(Size);
- return UniqueBuffer::MakeView(HashBuffer.data(), Size);
+ return UniqueBuffer::MakeMutableView(HashBuffer.data(), Size);
});
Hash = HashField.AsAttachment();
ZEN_ASSERT(!HashField.HasError(), "Attachments must be a non-empty binary value with a content hash.");
@@ -351,7 +351,7 @@ CbPackage::Load(BinaryReader& Reader, BufferAllocator Allocator, AttachmentResol
const auto StackAllocator = [&Allocator, &StackBuffer](uint64_t Size) -> UniqueBuffer {
if (Size <= sizeof(StackBuffer))
{
- return UniqueBuffer::MakeView(StackBuffer, Size);
+ return UniqueBuffer::MakeMutableView(StackBuffer, Size);
}
return Allocator(Size);