mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
impr: Make sure all data is received by MCP bridge
This commit is contained in:
2
lib/external/libwolv
vendored
2
lib/external/libwolv
vendored
Submodule lib/external/libwolv updated: b0c9416568...055e147804
@@ -33,9 +33,9 @@ namespace hex::mcp {
|
||||
}
|
||||
|
||||
client.writeString(request);
|
||||
auto response = client.readString(4_MiB);
|
||||
auto response = client.readBytesUntil(0x00);
|
||||
if (!response.empty() && response.front() != 0x00)
|
||||
output << response << '\n';
|
||||
output << std::string(response.begin(), response.end()) << '\n';
|
||||
|
||||
if (!client.isConnected())
|
||||
break;
|
||||
|
||||
@@ -157,8 +157,10 @@ namespace hex::mcp {
|
||||
|
||||
log::debug("MCP <---- {}", response.value_or("<Nothing>"));
|
||||
|
||||
if (response.has_value())
|
||||
if (response.has_value()) {
|
||||
response->push_back(0x00);
|
||||
return { response->begin(), response->end() };
|
||||
}
|
||||
else
|
||||
return std::vector<u8>{ 0x00 };
|
||||
}, [this](auto) {
|
||||
|
||||
@@ -218,6 +218,7 @@ namespace hex::crash {
|
||||
HANDLE_SIGNAL(SIGILL);
|
||||
HANDLE_SIGNAL(SIGABRT);
|
||||
HANDLE_SIGNAL(SIGFPE);
|
||||
HANDLE_SIGNAL(SIGINT)
|
||||
|
||||
#if defined (SIGBUS)
|
||||
HANDLE_SIGNAL(SIGBUS);
|
||||
|
||||
Reference in New Issue
Block a user