diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index a8b20b1dd15..6a49d638e14 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -85,7 +85,7 @@ static void _dump_DSCAPS(DWORD xmask) { }; unsigned int i; - for (i=0;iDeviceId = dataW->DeviceId; - lstrcpynW(data1->ModuleW, dataW->Module, sizeof(data1->ModuleW)/sizeof(*data1->ModuleW)); - lstrcpynW(data1->DescriptionW, dataW->Description, sizeof(data1->DescriptionW)/sizeof(*data1->DescriptionW)); + lstrcpynW(data1->ModuleW, dataW->Module, ARRAY_SIZE(data1->ModuleW)); + lstrcpynW(data1->DescriptionW, dataW->Description, ARRAY_SIZE(data1->DescriptionW)); WideCharToMultiByte(CP_ACP, 0, data1->DescriptionW, -1, data1->DescriptionA, sizeof(data1->DescriptionA)-1, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, data1->ModuleW, -1, data1->ModuleA, sizeof(data1->ModuleA)-1, NULL, NULL); data1->DescriptionA[sizeof(data1->DescriptionA)-1] = 0;