build: Updated libwolv
This commit is contained in:
parent
b3d208e6e6
commit
a83610bc06
2
lib/external/libwolv
vendored
2
lib/external/libwolv
vendored
@ -1 +1 @@
|
||||
Subproject commit 75c66934415785597bfc089c5373fb47747d3083
|
||||
Subproject commit a745623029d36fdaafeec0f1ccb539ff815b691b
|
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
||||
Subproject commit bc002793b0da4886f89b9bf230dff0d0226d21f3
|
||||
Subproject commit 950a47547553ff3c095c833c484547c8445bbac9
|
@ -40,16 +40,20 @@ namespace hex::init {
|
||||
// On Windows, argv contains UTF-16 encoded strings, so we need to convert them to UTF-8
|
||||
auto convertedCommandLine = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
|
||||
if (convertedCommandLine == nullptr) {
|
||||
log::error("Failed to convert command line arguments to UTF-8");
|
||||
log::error("Failed to get command line arguments");
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Skip the first argument (the executable path) and convert the rest to a vector of UTF-8 strings
|
||||
for (int i = 1; i < argc; i += 1) {
|
||||
std::wstring wcharArg = convertedCommandLine[i];
|
||||
std::string utf8Arg = wolv::util::wstringToUtf8(wcharArg);
|
||||
auto utf8Arg = wolv::util::wstringToUtf8(wcharArg);
|
||||
if (!utf8Arg.has_value()) {
|
||||
log::error("Failed to convert command line arguments to UTF-8");
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
args.push_back(utf8Arg);
|
||||
args.push_back(*utf8Arg);
|
||||
}
|
||||
|
||||
::LocalFree(convertedCommandLine);
|
||||
|
@ -45,7 +45,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
|
||||
if(ImGuiExt::IconHyperlink(ICON_VS_SEARCH, "hex.builtin.view.hex_editor.search.advanced"_lang)) {
|
||||
if (ImGuiExt::IconHyperlink(ICON_VS_SEARCH, "hex.builtin.view.hex_editor.search.advanced"_lang)) {
|
||||
TaskManager::doLater([editor] {
|
||||
const auto& view = ContentRegistry::Views::getViewByName("hex.builtin.view.find.name");
|
||||
|
||||
@ -286,25 +286,29 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
case Encoding::UTF16: {
|
||||
auto utf16 = wolv::util::utf8ToUtf16(s_inputString);
|
||||
if (!utf16.has_value())
|
||||
return;
|
||||
|
||||
for (auto &c: utf16) {
|
||||
for (auto &c : *utf16) {
|
||||
swapEndianness(c, Encoding::UTF16, m_stringEndianness);
|
||||
}
|
||||
|
||||
std::copy(reinterpret_cast<const u8 *>(utf16.data()),
|
||||
reinterpret_cast<const u8 *>(utf16.data() + utf16.size()),
|
||||
std::copy(reinterpret_cast<const u8 *>(utf16->data()),
|
||||
reinterpret_cast<const u8 *>(utf16->data() + utf16->size()),
|
||||
std::back_inserter(m_searchByteSequence));
|
||||
break;
|
||||
}
|
||||
case Encoding::UTF32: {
|
||||
auto utf32 = wolv::util::utf8ToUtf32(s_inputString);
|
||||
if (!utf32.has_value())
|
||||
return;
|
||||
|
||||
for (auto &c: utf32) {
|
||||
for (auto &c : *utf32) {
|
||||
swapEndianness(c, Encoding::UTF32, m_stringEndianness);
|
||||
}
|
||||
|
||||
std::copy(reinterpret_cast<const u8 *>(utf32.data()),
|
||||
reinterpret_cast<const u8 *>(utf32.data() + utf32.size()),
|
||||
std::copy(reinterpret_cast<const u8 *>(utf32->data()),
|
||||
reinterpret_cast<const u8 *>(utf32->data() + utf32->size()),
|
||||
std::back_inserter(m_searchByteSequence));
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user