diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-07 13:59:10 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-08 12:13:15 +0100 |
commit | d793262beba3a113bed4c728b572a78583b43277 (patch) | |
tree | e30bd93b43361cc563406dcd934e95f264d24bc9 /Userland/Applications/HexEditor | |
parent | 1edb96376b51519fe9a7aff2d281f243ca19fd45 (diff) | |
download | serenity-d793262beba3a113bed4c728b572a78583b43277.zip |
AK+Everywhere: Make UTF-16 to UTF-8 converter fallible
This could fail to allocate the underlying storage needed to store the
UTF-8 data. Propagate this error.
Diffstat (limited to 'Userland/Applications/HexEditor')
-rw-r--r-- | Userland/Applications/HexEditor/HexEditorWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 0e363be188..122d377020 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -372,7 +372,7 @@ void HexEditorWidget::update_inspector_values(size_t position) if (valid_code_units == 0) value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF16, ""); else - value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF16, utf16_view.unicode_substring_view(0, 1).to_utf8()); + value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF16, utf16_view.unicode_substring_view(0, 1).to_utf8().release_value_but_fixme_should_propagate_errors()); } else { value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF16, ""); } |