mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
fix: Try to fix build again
This commit is contained in:
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
Submodule lib/external/pattern_language updated: 8de0661b97...089a34f507
@@ -139,15 +139,16 @@ namespace hex::plugin::builtin {
|
||||
ImGui::TextUnformatted(binary.c_str());
|
||||
return binary;
|
||||
};
|
||||
}, [](std::string value, std::endian endian) -> std::vector<u8> {
|
||||
}, [](const std::string &value, std::endian endian) -> std::vector<u8> {
|
||||
hex::unused(endian);
|
||||
|
||||
if (value.size() > 2 && value.starts_with("0b"))
|
||||
value = value.substr(2);
|
||||
std::string binary = value;
|
||||
if (binary.starts_with("0b"))
|
||||
binary = binary.substr(2);
|
||||
|
||||
if (value.size() > 8) return { };
|
||||
if (binary.size() > 8) return { };
|
||||
|
||||
if (auto result = hex::parseBinaryString(value); result.has_value())
|
||||
if (auto result = hex::parseBinaryString(binary); result.has_value())
|
||||
return { result.value() };
|
||||
else
|
||||
return { };
|
||||
|
||||
Reference in New Issue
Block a user