mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-02 15:56:02 +00:00
Declare packetFreed as volatile
This commit is contained in:
parent
c88b1bcf8e
commit
82105f2f8f
@ -492,7 +492,7 @@ static bool decryptControlMessageToV1(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket,
|
|||||||
static void enetPacketFreeCb(ENetPacket* packet) {
|
static void enetPacketFreeCb(ENetPacket* packet) {
|
||||||
if (packet->userData) {
|
if (packet->userData) {
|
||||||
// userData contains a bool that we will set when freed
|
// userData contains a bool that we will set when freed
|
||||||
*(bool*)packet->userData = true;
|
*(volatile bool*)packet->userData = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,7 +574,7 @@ static bool sendMessageEnet(short ptype, short paylen, const void* payload) {
|
|||||||
PltLockMutex(&enetMutex);
|
PltLockMutex(&enetMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool packetFreed = false;
|
volatile bool packetFreed = false;
|
||||||
|
|
||||||
// Set a callback to use to let us know if the packet has been freed.
|
// Set a callback to use to let us know if the packet has been freed.
|
||||||
// Freeing can only happen when the packet is acked or send fails.
|
// Freeing can only happen when the packet is acked or send fails.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user