Skip to content

Commit

Permalink
fix: use byte buffer cursor to reinterpret core type
Browse files Browse the repository at this point in the history
  • Loading branch information
piiertho authored May 11, 2024
1 parent c178302 commit 6dadf0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kt_variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ namespace ktvariant {

template<class T>
static Variant from_kvariant_to_kVariantCoreTypeValue(SharedBuffer* byte_buffer) {
auto result { reinterpret_cast<T*>(byte_buffer) };
auto result { reinterpret_cast<T*>(byte_buffer->get_cursor()) };
byte_buffer->increment_position(sizeof(T));
return *result;
}
Expand Down

0 comments on commit 6dadf0c

Please sign in to comment.