1
0
mirror of synced 2025-01-31 12:03:46 +01:00

fix: Try to fix build again

This commit is contained in:
WerWolv 2023-02-19 10:25:39 +01:00
parent 277c83e6d8
commit 91928b45d8
2 changed files with 7 additions and 6 deletions

@ -1 +1 @@
Subproject commit 8de0661b9797721f47974ed1fbe07e7013395122
Subproject commit 089a34f5073f63c41822561ea49d2d0248b55dbd

View File

@ -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 { };