mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 16:47:34 +00:00
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.
This commit is contained in:
parent
1edb96376b
commit
d793262beb
10 changed files with 25 additions and 22 deletions
|
@ -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, "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue