diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-10-05 01:27:06 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-10-05 01:27:06 +0200 |
commit | 81e656921b7824ae258576ba7df48276419e0dda (patch) | |
tree | ca882cb0739f6eaf7ecac15b0ee1eb7d0992217b /src/openvic-dataloader | |
parent | 6d7bfd10da039aaa14aae8d4c5a9a57769058f65 (diff) |
Fix BufferHandler assuming buffers of size 0 are invalid
Diffstat (limited to 'src/openvic-dataloader')
-rw-r--r-- | src/openvic-dataloader/detail/BasicBufferHandler.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ovdl::ParseError> load_buffer_size(const char* data, std::size_t size) { |