mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +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
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);
|
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));
|
TRY(discard(sizeof(T) * count));
|
||||||
return span;
|
return span;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue