[win] Fix a memory buffer bug in worktree monitor.