opcservices: Update content stream position on Read().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8479238fec
commit
55af98d1a3
|
@ -560,6 +560,8 @@ static HRESULT WINAPI opc_content_stream_Read(IStream *iface, void *buff, ULONG
|
|||
if (*num_read)
|
||||
memcpy(buff, stream->content->data + stream->pos.QuadPart, *num_read);
|
||||
|
||||
stream->pos.QuadPart += *num_read;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -159,6 +159,11 @@ static void test_package(void)
|
|||
ok(hr == S_OK, "Failed to read content, hr %#x.\n", hr);
|
||||
ok(!memcmp(buff, "abc", 3), "Unexpected content.\n");
|
||||
|
||||
move.QuadPart = 0;
|
||||
hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos);
|
||||
ok(SUCCEEDED(hr), "Seek failed, hr %#x.\n", hr);
|
||||
ok(pos.QuadPart == 3, "Unexpected position.\n");
|
||||
|
||||
IStream_Release(stream);
|
||||
IStream_Release(stream2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue