diff options
author | hle0 <91701075+hle0@users.noreply.github.com> | 2022-03-26 22:10:30 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-04-12 01:06:31 +0200 |
commit | d98e2bdaa3903de29f62791c05472a693b0ea36b (patch) | |
tree | e2acc9547a4dc5a1d52468f7eff1174aa29b08e4 /src/StringCompression.cpp | |
parent | Disable u8 prefix C++20 warning since we need it (diff) | |
download | cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar.gz cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar.bz2 cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar.lz cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar.xz cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.tar.zst cuberite-d98e2bdaa3903de29f62791c05472a693b0ea36b.zip |
Diffstat (limited to 'src/StringCompression.cpp')
-rw-r--r-- | src/StringCompression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringCompression.cpp b/src/StringCompression.cpp index 6678fe1bd..d82f45987 100644 --- a/src/StringCompression.cpp +++ b/src/StringCompression.cpp @@ -76,7 +76,7 @@ Compression::Result Compression::Compressor::Compress(const void * const Input, { // First see if the stack buffer has enough space: { - Result::Static Buffer; + Result::Static Buffer = {static_cast<std::byte>(0)}; const auto BytesWrittenOut = Algorithm(m_Handle, Input, Size, Buffer.data(), Buffer.size()); if (BytesWrittenOut != 0) @@ -189,7 +189,7 @@ Compression::Result Compression::Extractor::Extract(const ContiguousByteBufferVi { // First see if the stack buffer has enough space: { - Result::Static Buffer; + Result::Static Buffer = {static_cast<std::byte>(0)}; size_t BytesWrittenOut; switch (Algorithm(m_Handle, Input.data(), Input.size(), Buffer.data(), Buffer.size(), &BytesWrittenOut)) |