From 151929098971d77f10c427bd376286302dc063d3 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 Nov 2023 14:56:32 +0000 Subject: [PATCH] AK: Cast pointer in FixedMemoryStream::read_in_place(count) I didn't notice this before because I only ever called it with u8. Oops! --- AK/MemoryStream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/MemoryStream.h b/AK/MemoryStream.h index fba629bee2..383d03336d 100644 --- a/AK/MemoryStream.h +++ b/AK/MemoryStream.h @@ -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 span { m_bytes.offset_pointer(m_offset), count }; + Span span { reinterpret_cast(m_bytes.offset_pointer(m_offset)), count }; TRY(discard(sizeof(T) * count)); return span; }