mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Fix miscalculated size check
This commit is contained in:
@@ -122,7 +122,7 @@ static int sendMessageAndForget(short ptype, short paylen, const void* payload)
|
|||||||
err = send(ctlSock, (char*) packet, sizeof(*packet) + paylen, 0);
|
err = send(ctlSock, (char*) packet, sizeof(*packet) + paylen, 0);
|
||||||
free(packet);
|
free(packet);
|
||||||
|
|
||||||
if (err != sizeof(*packet)) {
|
if (err != sizeof(*packet) + paylen) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user