[winpr,stream] Add Stream_ResetPosition

A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
This commit is contained in:
Armin Novak
2026-02-27 20:04:43 +01:00
parent 41c9286c3c
commit 92ab55c5e1
65 changed files with 175 additions and 171 deletions

View File

@@ -380,7 +380,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
const size_t length = Stream_GetPosition(output);
if (length > UINT32_MAX)
goto out;
Stream_SetPosition(output, 0);
Stream_ResetPosition(output);
Stream_Write_UINT32(output, ifman.output_interface_id);
Stream_Write_UINT32(output, MessageId);
DEBUG_TSMF("response size %d", length);