From 2fd4b22a8367f75995501822e772055ef8318d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Mar 2006 16:02:09 +0000 Subject: gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355). Original commit message from CVS: * gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355). --- gst/modplug/libmodplug/load_ptm.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gst') diff --git a/gst/modplug/libmodplug/load_ptm.cpp b/gst/modplug/libmodplug/load_ptm.cpp index 8a4d7ac6..278c0aa1 100644 --- a/gst/modplug/libmodplug/load_ptm.cpp +++ b/gst/modplug/libmodplug/load_ptm.cpp @@ -120,10 +120,15 @@ BOOL CSoundFile::ReadPTM(const BYTE *lpStream, DWORD dwMemLength) { UINT smpflg = RS_PCM8D; DWORD samplepos; - pins->nLength = bswapLE32(*(LPDWORD)(psmp->length)); - pins->nLoopStart = bswapLE32(*(LPDWORD)(psmp->loopbeg)); - pins->nLoopEnd = bswapLE32(*(LPDWORD)(psmp->loopend)); - samplepos = bswapLE32(*(LPDWORD)(&psmp->fileofs)); + DWORD psmp_length, psmp_loopbeg, psmp_loopend, psmp_fileofs; + memcpy (&psmp_length, (void *) psmp->length, sizeof (DWORD)); + memcpy (&psmp_loopbeg, (void *) psmp->loopbeg, sizeof (DWORD)); + memcpy (&psmp_loopend, (void *) psmp->loopend, sizeof (DWORD)); + memcpy (&psmp_fileofs, (void *) psmp->fileofs, sizeof (DWORD)); + pins->nLength = bswapLE32(psmp_length); + pins->nLoopStart = bswapLE32(psmp_loopbeg); + pins->nLoopEnd = bswapLE32(psmp_loopend); + samplepos = bswapLE32(psmp_fileofs); if (psmp->sampletype & 4) pins->uFlags |= CHN_LOOP; if (psmp->sampletype & 8) pins->uFlags |= CHN_PINGPONGLOOP; if (psmp->sampletype & 16) -- cgit v1.2.1