From 8e33ff3436666ca8a240be148467c2ffbd89dcba Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 16 Nov 2009 18:13:56 +0000 Subject: [PATCH] - Various bugfixes found by Amine48rz svn path=/trunk/; revision=44201 --- reactos/dll/directx/directx.rbuild | 4 ++-- reactos/dll/directx/dsound_new/devicelist.c | 2 +- reactos/dll/directx/dsound_new/enum.c | 6 +++++- reactos/dll/directx/dsound_new/notify.c | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/reactos/dll/directx/directx.rbuild b/reactos/dll/directx/directx.rbuild index 1f5718d37c6..6521275d0c6 100644 --- a/reactos/dll/directx/directx.rbuild +++ b/reactos/dll/directx/directx.rbuild @@ -25,8 +25,8 @@ - - + + diff --git a/reactos/dll/directx/dsound_new/devicelist.c b/reactos/dll/directx/dsound_new/devicelist.c index 87ca9339e8e..8441eb99146 100644 --- a/reactos/dll/directx/dsound_new/devicelist.c +++ b/reactos/dll/directx/dsound_new/devicelist.c @@ -408,7 +408,7 @@ EnumAudioDeviceInterfaces( } /* sanity check */ - ASSERT(OutRootInfo); + ASSERT(*OutRootInfo); CurInfo = *OutRootInfo; diff --git a/reactos/dll/directx/dsound_new/enum.c b/reactos/dll/directx/dsound_new/enum.c index 163c19ff2dc..777168fb27a 100644 --- a/reactos/dll/directx/dsound_new/enum.c +++ b/reactos/dll/directx/dsound_new/enum.c @@ -91,7 +91,11 @@ DoDSoundCallback( } DriverNameA[0] = 0; - WideCharToMultiByte(CP_ACP, 0, ProductName, -1, DriverNameA, sizeof(DriverNameA) / sizeof(char), NULL, NULL); + if (ProductName) + { + WideCharToMultiByte(CP_ACP, 0, ProductName, -1, DriverNameA, sizeof(DriverNameA) / sizeof(char), NULL, NULL); + DriverNameA[(sizeof(DriverNameA) / sizeof(char))-1] = 0; + } return lpDSEnumCallbackA(DeviceGuid, (LPSTR)Buffer, DriverNameA, lpContext); } diff --git a/reactos/dll/directx/dsound_new/notify.c b/reactos/dll/directx/dsound_new/notify.c index e3e31da7855..8028b48a60c 100644 --- a/reactos/dll/directx/dsound_new/notify.c +++ b/reactos/dll/directx/dsound_new/notify.c @@ -157,7 +157,6 @@ IDirectSoundNotify_fnSetNotificationPositions( if (Result != ERROR_SUCCESS) { DPRINT1("Failed to enable event %p Position %u\n", pcPositionNotifies[Index].hEventNotify, pcPositionNotifies[Index].dwOffset); - return DSERR_GENERIC; } } }