From 8f4bec2b4a5131571e33040514a489acf3ca44ba Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Mon, 27 Feb 2023 22:43:26 +0000 Subject: [PATCH] LibJS: Add missing TRY in StringIteratorPrototype::next --- Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp index 6e7b70c73c..9e83dc6255 100644 --- a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp @@ -45,7 +45,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringIteratorPrototype::next) } ThrowableStringBuilder builder(vm); - builder.append_code_point(*utf8_iterator); + TRY(builder.append_code_point(*utf8_iterator)); ++utf8_iterator; return create_iterator_result_object(vm, PrimitiveString::create(vm, TRY(builder.to_string())), false);