[channels] use Stream_BufferAs

For WTSVirtualChannelRead and WTSVirtualChannelWrite use Stream_BufferAs
to cast to correct type.
This commit is contained in:
akallabeth
2024-10-01 10:25:30 +02:00
parent 55177e0e46
commit 11b7633dc0
18 changed files with 47 additions and 39 deletions

View File

@@ -653,7 +653,7 @@ static DWORD WINAPI tf_debug_channel_thread_func(LPVOID arg)
Stream_SetPosition(s, 0);
if (WTSVirtualChannelRead(context->debug_channel, 0, (PCHAR)Stream_Buffer(s),
if (WTSVirtualChannelRead(context->debug_channel, 0, Stream_BufferAs(s, char),
(ULONG)Stream_Capacity(s), &BytesReturned) == FALSE)
{
if (BytesReturned == 0)
@@ -662,7 +662,7 @@ static DWORD WINAPI tf_debug_channel_thread_func(LPVOID arg)
if (!Stream_EnsureRemainingCapacity(s, BytesReturned))
break;
if (WTSVirtualChannelRead(context->debug_channel, 0, (PCHAR)Stream_Buffer(s),
if (WTSVirtualChannelRead(context->debug_channel, 0, Stream_BufferAs(s, char),
(ULONG)Stream_Capacity(s), &BytesReturned) == FALSE)
{
/* should not happen */