From 81e656921b7824ae258576ba7df48276419e0dda Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Wed, 4 Oct 2023 19:27:06 -0400 Subject: Fix BufferHandler assuming buffers of size 0 are invalid --- src/openvic-dataloader/detail/BasicBufferHandler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/openvic-dataloader/detail') diff --git a/src/openvic-dataloader/detail/BasicBufferHandler.hpp b/src/openvic-dataloader/detail/BasicBufferHandler.hpp index 72b85d3..f26544b 100644 --- a/src/openvic-dataloader/detail/BasicBufferHandler.hpp +++ b/src/openvic-dataloader/detail/BasicBufferHandler.hpp @@ -18,7 +18,7 @@ namespace ovdl::detail { using encoding_type = Encoding; OVDL_OPTIONAL_CONSTEXPR bool is_valid() const { - return _buffer.size() != 0; + return _buffer.data() != nullptr; } OVDL_OPTIONAL_CONSTEXPR std::optional load_buffer_size(const char* data, std::size_t size) { -- cgit v1.2.3-56-ga3b1