diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-14 20:16:31 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-01-15 23:06:31 -0500 |
commit | 6777cb097553d9d72dd335e3caf0ad9c664add2d (patch) | |
tree | 81250d093d3c49514bfa2589ef78e02bb90c9ed8 /Userland | |
parent | 3b824ec8c92d48dd80ca0ffac1996eb1e7f4cede (diff) | |
download | serenity-6777cb097553d9d72dd335e3caf0ad9c664add2d.zip |
LibCore: Fix up type mistakes in `Stream::read_trivial_value`
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibCore/Stream.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCore/Stream.h b/Userland/Libraries/LibCore/Stream.h index b69b6ac4c0..3f75850f1b 100644 --- a/Userland/Libraries/LibCore/Stream.h +++ b/Userland/Libraries/LibCore/Stream.h @@ -113,8 +113,8 @@ public: ErrorOr<T> read_trivial_value() { alignas(T) u8 buffer[sizeof(T)] = {}; - TRY(read_entire_buffer(buffer)); - return *bit_cast<T>(buffer); + TRY(read_entire_buffer({ &buffer, sizeof(buffer) })); + return bit_cast<T>(buffer); } template<typename T> |