Fix command handling bug in wt-monitor (#2736)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks 2024-01-31 15:21:59 +08:00 committed by GitHub
parent 12058215fc
commit 6c869d42dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -264,7 +264,7 @@ start_watch_cmd_pipe (SeafWTMonitor *monitor, OVERLAPPED *ol_in)
HANDLE hPipe = (HANDLE)monitor->cmd_pipe[0];
void *p = &priv->cmd + priv->cmd_bytes_read;
void *p = (char *)(&priv->cmd) + priv->cmd_bytes_read;
int to_read = sizeof(WatchCommand) - priv->cmd_bytes_read;
BOOL sts = ReadFile