mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
InspectorServer: Use the 32-bit data length when sending a request
`length` was inheriting `size_t` type of the `String::length()`, while everywhere else in the Inspector we expect fixed 32-bit field. On the architectures where `sizeof(size_t) != sizeof(u32)` this broke the Inspector communication completely.
This commit is contained in:
parent
1b8012e5c7
commit
46f6c86362
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ String InspectableProcess::wait_for_response()
|
|||
void InspectableProcess::send_request(JsonObject const& request)
|
||||
{
|
||||
auto serialized = request.to_string();
|
||||
auto length = serialized.length();
|
||||
u32 length = serialized.length();
|
||||
m_socket->write((u8 const*)&length, sizeof(length));
|
||||
m_socket->write(serialized);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue