From 6c869d42dc6f241abd1d0e9d6d39c096c623bab2 Mon Sep 17 00:00:00 2001 From: feiniks <36756310+feiniks@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:21:59 +0800 Subject: [PATCH] Fix command handling bug in wt-monitor (#2736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 杨赫然 --- daemon/wt-monitor-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/wt-monitor-win32.c b/daemon/wt-monitor-win32.c index 76dd5ac4..6d5b2f11 100644 --- a/daemon/wt-monitor-win32.c +++ b/daemon/wt-monitor-win32.c @@ -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