Skip to content

Commit

Permalink
Fixing flatbuffer size calculation to include prefix size during stor…
Browse files Browse the repository at this point in the history
…ing flatbuffer to disk (#67)
  • Loading branch information
sdjordjevicTT authored Jul 2, 2024
1 parent be4672a commit 0664b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/lib/binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Flatbuffer Flatbuffer::loadFromPath(char const *path) {
void Flatbuffer::store(char const *path) const {
// store a flatbuffer to path
std::ofstream fbb(path, std::ios::binary);
auto size = ::flatbuffers::GetPrefixedSize(
auto size = ::flatbuffers::GetSizePrefixedBufferLength(
static_cast<const uint8_t *>(handle.get()));
fbb.write(reinterpret_cast<char const *>(handle.get()), size);
}
Expand Down

0 comments on commit 0664b5a

Please sign in to comment.