mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
fix dereferencing type-punned pointer errors
This commit is contained in:
parent
0d755a0dd6
commit
9113ea6fd4
1 changed files with 3 additions and 4 deletions
|
@ -289,8 +289,7 @@ SNDDMA_InitDirect (void)
|
|||
reps = 0;
|
||||
|
||||
while ((hresult = IDirectSoundBuffer_Lock (pDSBuf, 0, gSndBufSize,
|
||||
(LPVOID *) & lpData, &dwSize,
|
||||
NULL, NULL, 0)) != DS_OK) {
|
||||
(LPVOID *)(char *)&lpData, &dwSize, NULL, NULL, 0)) != DS_OK) {
|
||||
if (hresult != DSERR_BUFFERLOST) {
|
||||
Sys_Printf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
|
||||
FreeSound ();
|
||||
|
@ -435,8 +434,8 @@ DSOUND_LockBuffer (qboolean lockit)
|
|||
if (lockit) {
|
||||
reps = 0;
|
||||
while ((hresult = IDirectSoundBuffer_Lock
|
||||
(pDSBuf, 0, gSndBufSize, (LPVOID *) & pbuf1, &dwSize,
|
||||
(LPVOID *) & pbuf2, &dwSize2, 0)) != DS_OK) {
|
||||
(pDSBuf, 0, gSndBufSize, (LPVOID *)(char *) &pbuf1, &dwSize,
|
||||
(LPVOID *)(char *) &pbuf2, &dwSize2, 0)) != DS_OK) {
|
||||
if (hresult != DSERR_BUFFERLOST) {
|
||||
Sys_Printf
|
||||
("S_TransferStereo16: DS::Lock Sound Buffer Failed\n");
|
||||
|
|
Loading…
Reference in a new issue