summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL
diff options
context:
space:
mode:
authorMatthias Zimmerman <matthias291999@gmail.com>2022-06-13 05:20:42 -0700
committerLinus Groh <mail@linusgroh.de>2022-06-13 15:38:51 +0100
commitc10d48b72c9d24ccd79205ee7a22a6862c4c6769 (patch)
tree4e2a3104e990a6904b46b87b67085754da015b3e /Userland/Libraries/LibSQL
parentc0486f93d4416b4f67885e6b787de542e1f680c5 (diff)
downloadserenity-c10d48b72c9d24ccd79205ee7a22a6862c4c6769.zip
AK/ByteBuffer+Everywhere: Handle errors in ByteBuffer::slice()
Diffstat (limited to 'Userland/Libraries/LibSQL')
-rw-r--r--Userland/Libraries/LibSQL/Heap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSQL/Heap.cpp b/Userland/Libraries/LibSQL/Heap.cpp
index 813909df3e..396172b67f 100644
--- a/Userland/Libraries/LibSQL/Heap.cpp
+++ b/Userland/Libraries/LibSQL/Heap.cpp
@@ -202,7 +202,7 @@ constexpr static int USER_VALUES_OFFSET = 32;
ErrorOr<void> Heap::read_zero_block()
{
auto buffer = TRY(read_block(0));
- auto file_id_buffer = buffer.slice(0, FILE_ID.length());
+ auto file_id_buffer = TRY(buffer.slice(0, FILE_ID.length()));
auto file_id = StringView(file_id_buffer);
if (file_id != FILE_ID) {
warnln("{}: Zero page corrupt. This is probably not a {} heap file"sv, name(), FILE_ID);