From 5623e1342b3bd880e2f786c73db0f08b13811da2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 3 Jun 2022 18:46:38 +0200 Subject: [PATCH] fix: Crashes when parsing invalid wstrings --- lib/external/pattern_language | 2 +- plugins/builtin/source/content/data_inspector.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 23ec4e4ef..31ae5773b 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 23ec4e4ef18d55b7201363b3b3ce8ab8635599b8 +Subproject commit 31ae5773b099cb48cdd81bc8b6c01e6da94fe672 diff --git a/plugins/builtin/source/content/data_inspector.cpp b/plugins/builtin/source/content/data_inspector.cpp index 8c0fc0c11..5783099b6 100644 --- a/plugins/builtin/source/content/data_inspector.cpp +++ b/plugins/builtin/source/content/data_inspector.cpp @@ -314,7 +314,7 @@ namespace hex::plugin::builtin { return [value] { ImGui::TextFormatted("'{0}'", value.c_str()); return value; }; }, [](const std::string &value, std::endian endian) -> std::vector { - std::wstring_convert> converter(""); + std::wstring_convert> converter("Invalid"); std::vector bytes; auto wideString = converter.from_bytes(value.c_str());