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
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/1519290989 Pull-request: https://github.com/SerenityOS/serenity/pull/21744
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue