mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-23 00:19:53 +00:00
Fix freeing of a stack allocation. Fix bad LC_ASSERT definition on non-Windows platforms
This commit is contained in:
@@ -131,7 +131,7 @@ static void DecoderThreadProc(void* context) {
|
||||
}
|
||||
|
||||
int readFirstFrame(void) {
|
||||
char firstFrame[1000];
|
||||
char* firstFrame;
|
||||
int err;
|
||||
int offset = 0;
|
||||
|
||||
@@ -140,6 +140,11 @@ int readFirstFrame(void) {
|
||||
return LastSocketError();
|
||||
}
|
||||
|
||||
firstFrame = (char*)malloc(1500);
|
||||
if (firstFrame == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Limelog("Waiting for first frame\n");
|
||||
for (;;) {
|
||||
err = recv(firstFrameSocket, &firstFrame[offset], sizeof(firstFrame) - offset, 0);
|
||||
|
||||
Reference in New Issue
Block a user