Skip to content

Commit

Permalink
Merge pull request #9 from OpenVicProject/fix/zero-size-buffer-is-act…
Browse files Browse the repository at this point in the history
…ually-valid
  • Loading branch information
Spartan322 authored Oct 12, 2023
2 parents eeb1028 + e1cbc0e commit 96c316c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexy-vdf/detail/BasicBufferHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace lexy_vdf::detail {
using encoding_type = Encoding;

LVDF_OPTIONAL_CONSTEXPR bool is_valid() const {
return _buffer.size() != 0;
return _buffer.data() != nullptr;
}

LVDF_OPTIONAL_CONSTEXPR std::optional<lexy_vdf::ParseError> load_buffer_size(const char* data, std::size_t size) {
Expand Down

0 comments on commit 96c316c

Please sign in to comment.