From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmusic/dmobject.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/dmusic/dmobject.c b/dlls/dmusic/dmobject.c index 07d887a376c..a08db8cba58 100644 --- a/dlls/dmusic/dmobject.c +++ b/dlls/dmusic/dmobject.c @@ -338,11 +338,10 @@ HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk) } } - if (chunk->id == FOURCC_LIST || chunk->id == FOURCC_RIFF) { - hr = stream_read(stream, &chunk->type, sizeof(FOURCC)); - if (hr != S_OK) - return hr != S_FALSE ? hr : E_FAIL; - } + if (chunk->id != FOURCC_LIST && chunk->id != FOURCC_RIFF) + chunk->type = 0; + else if ((hr = stream_read(stream, &chunk->type, sizeof(FOURCC))) != S_OK) + return hr != S_FALSE ? hr : E_FAIL; TRACE_(dmfile)("Returning %s\n", debugstr_chunk(chunk)); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3781