diff options
Diffstat (limited to 'Userland/Libraries/LibTLS/TLSPacketBuilder.h')
-rw-r--r-- | Userland/Libraries/LibTLS/TLSPacketBuilder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTLS/TLSPacketBuilder.h b/Userland/Libraries/LibTLS/TLSPacketBuilder.h index 40c0f72139..dfc6cf7394 100644 --- a/Userland/Libraries/LibTLS/TLSPacketBuilder.h +++ b/Userland/Libraries/LibTLS/TLSPacketBuilder.h @@ -7,6 +7,7 @@ #pragma once #include <AK/ByteBuffer.h> +#include <AK/ByteReader.h> #include <AK/Endian.h> #include <AK/Types.h> @@ -38,7 +39,7 @@ public: m_packet_data = ByteBuffer::create_uninitialized(size_hint + 16); m_current_length = 5; m_packet_data[0] = (u8)type; - *(u16*)m_packet_data.offset_pointer(1) = AK::convert_between_host_and_network_endian((u16)version); + ByteReader::store(m_packet_data.offset_pointer(1), AK::convert_between_host_and_network_endian((u16)version)); } inline void append(u16 value) |