1
0
mirror of synced 2024-11-25 00:00:27 +01:00

fix: Crashes when parsing invalid wstrings

This commit is contained in:
WerWolv 2022-06-03 18:46:38 +02:00
parent 6bad50c78b
commit 5623e1342b
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 23ec4e4ef18d55b7201363b3b3ce8ab8635599b8
Subproject commit 31ae5773b099cb48cdd81bc8b6c01e6da94fe672

View File

@ -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<u8> {
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter("");
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter("Invalid");
std::vector<u8> bytes;
auto wideString = converter.from_bytes(value.c_str());