Commit ea85c5b1 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dmband: Assign to struct instead of using memcpy.

parent 41025d56
......@@ -302,7 +302,7 @@ static HRESULT IDirectMusicBandTrack_IPersistStream_LoadBand (LPPERSISTSTREAM if
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
memcpy(&pNewBand->BandHeader, pHeader, sizeof(DMUS_PRIVATE_BAND_ITEM_HEADER));
pNewBand->BandHeader = *pHeader;
pNewBand->pBand = (IDirectMusicBandImpl*)((char*)(*ppBand) - offsetof(IDirectMusicBandImpl,BandVtbl));
IDirectMusicBand_AddRef(*ppBand);
list_add_tail (&This->Bands, &pNewBand->entry);
......@@ -322,6 +322,8 @@ static HRESULT IDirectMusicBandTrack_IPersistStream_ParseBandsList (LPPERSISTSTR
IDirectMusicBand* pBand = NULL;
DMUS_PRIVATE_BAND_ITEM_HEADER header;
memset(&header, 0, sizeof header);
if (pChunk->fccID != DMUS_FOURCC_BANDS_LIST) {
ERR_(dmfile)(": %s chunk should be a BANDS list\n", debugstr_fourcc (pChunk->fccID));
return E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment