fix: Try to fix build again
This commit is contained in:
parent
277c83e6d8
commit
91928b45d8
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
||||
Subproject commit 8de0661b9797721f47974ed1fbe07e7013395122
|
||||
Subproject commit 089a34f5073f63c41822561ea49d2d0248b55dbd
|
@ -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 { };
|
||||
|
Loading…
x
Reference in New Issue
Block a user