fix: Crashes when parsing invalid wstrings
This commit is contained in:
parent
6bad50c78b
commit
5623e1342b
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
||||
Subproject commit 23ec4e4ef18d55b7201363b3b3ce8ab8635599b8
|
||||
Subproject commit 31ae5773b099cb48cdd81bc8b6c01e6da94fe672
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user