mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-17 16:53:13 +00:00
Fixed bug in unshift() logic in do/while loop on windows IPC
This commit is contained in:
@@ -929,6 +929,7 @@ BOOL ILibDuktape_server_ipc_ReadSink(void *chain, HANDLE h, ILibWaitHandle_Error
|
|||||||
ILibDuktape_DuplexStream_WriteData(winIPC->ds, winIPC->buffer + winIPC->bufferOffset, winIPC->totalRead);
|
ILibDuktape_DuplexStream_WriteData(winIPC->ds, winIPC->buffer + winIPC->bufferOffset, winIPC->totalRead);
|
||||||
}
|
}
|
||||||
if (winIPC->unshiftedBytes > winIPC->totalRead) { winIPC->unshiftedBytes = winIPC->totalRead; }
|
if (winIPC->unshiftedBytes > winIPC->totalRead) { winIPC->unshiftedBytes = winIPC->totalRead; }
|
||||||
|
consumed = winIPC->totalRead - winIPC->unshiftedBytes;
|
||||||
winIPC->bufferOffset += (winIPC->totalRead - winIPC->unshiftedBytes);
|
winIPC->bufferOffset += (winIPC->totalRead - winIPC->unshiftedBytes);
|
||||||
winIPC->totalRead -= (winIPC->totalRead - winIPC->unshiftedBytes);
|
winIPC->totalRead -= (winIPC->totalRead - winIPC->unshiftedBytes);
|
||||||
} while (winIPC->paused == 0 && consumed != 0 && winIPC->totalRead > 0);
|
} while (winIPC->paused == 0 && consumed != 0 && winIPC->totalRead > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user