mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-02 22:24:26 +00:00
AK: Cast pointer in FixedMemoryStream::read_in_place(count)
I didn't notice this before because I only ever called it with u8. Oops!
This commit is contained in:
parent
89b35c6dc8
commit
1519290989
|
@ -64,7 +64,7 @@ public:
|
|||
return Error::from_string_view_or_print_error_and_return_errno("Tried to obtain a non-const span from a read-only FixedMemoryStream"sv, EINVAL);
|
||||
}
|
||||
|
||||
Span<T> span { m_bytes.offset_pointer(m_offset), count };
|
||||
Span<T> span { reinterpret_cast<T*>(m_bytes.offset_pointer(m_offset)), count };
|
||||
TRY(discard(sizeof(T) * count));
|
||||
return span;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue