From f8e94f286280c4c6ed05c5490a7f55773adc491b Mon Sep 17 00:00:00 2001 From: Karol Baraniecki Date: Tue, 7 Mar 2023 14:33:39 +0100 Subject: LibCore: Use fallible versions of StringBuilder::append in MimeData --- Userland/Libraries/LibCore/MimeData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland') diff --git a/Userland/Libraries/LibCore/MimeData.cpp b/Userland/Libraries/LibCore/MimeData.cpp index dea65ff588..7951172a3c 100644 --- a/Userland/Libraries/LibCore/MimeData.cpp +++ b/Userland/Libraries/LibCore/MimeData.cpp @@ -35,8 +35,8 @@ ErrorOr MimeData::set_urls(Vector const& urls) { StringBuilder builder; for (auto& url : urls) { - builder.append(url.to_deprecated_string()); - builder.append('\n'); + TRY(builder.try_append(url.to_deprecated_string())); + TRY(builder.try_append('\n')); } set_data("text/uri-list", TRY(builder.try_to_byte_buffer())); -- cgit v1.2.3