From 8fa34b43cedcd4a179f984d6910bf8a6db5ebd34 Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:25:48 +0200 Subject: [PATCH] HexEditor: Fix utf16 validation Previously the utf8_view was validated for the utf16 valude instead of the utf16_view. --- Userland/Applications/HexEditor/HexEditorWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 16b88d02fa..b192d037e6 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -347,7 +347,7 @@ void HexEditorWidget::update_inspector_values(size_t position) if (byte_read_count % 2 == 0) { Utf16View utf16_view { Span { reinterpret_cast(&unsigned_64_bit_int), 4 } }; size_t valid_code_units; - utf8_view.validate(valid_code_units); + utf16_view.validate(valid_code_units); if (valid_code_units == 0) value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF16, ""); else