Alex Villacís Lasso : msacm: acmDriverPriority() compares dwPriority against negative values.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 25 09:46:52 CDT 2006


Module: wine
Branch: master
Commit: b897ad1774b71e747a74726ea6c280cbd42633c3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b897ad1774b71e747a74726ea6c280cbd42633c3

Author: Alex Villacís Lasso <a_villacis at palosanto.com>
Date:   Sat Sep 16 12:26:06 2006 -0500

msacm: acmDriverPriority() compares dwPriority against negative values.

This issue was spotted by Andrew Talbot.

---

 dlls/msacm32/driver.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msacm32/driver.c b/dlls/msacm32/driver.c
index e537bc4..37dc929 100644
--- a/dlls/msacm32/driver.c
+++ b/dlls/msacm32/driver.c
@@ -671,9 +671,9 @@ MMRESULT WINAPI acmDriverPriority(HACMDR
                 if (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL) {
                     return MMSYSERR_NOTSUPPORTED;
                 }
-                if (dwPriority != 1 && dwPriority != -1) {
+                if (dwPriority != 1 && dwPriority != (DWORD)-1) {
                     FIXME("unexpected priority %ld, using sign only\n", dwPriority);
-                    if (dwPriority < 0) dwPriority = -1;
+                    if ((signed)dwPriority < 0) dwPriority = (DWORD)-1;
                     if (dwPriority > 0) dwPriority = 1;
                 }
                 
@@ -681,7 +681,7 @@ MMRESULT WINAPI acmDriverPriority(HACMDR
                     (padid->pPrevACMDriverID->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL))) {
                     /* do nothing - driver is first of list, or first after last
                        local driver */
-                } else if (dwPriority == -1 && padid->pNextACMDriverID == NULL) {
+                } else if (dwPriority == (DWORD)-1 && padid->pNextACMDriverID == NULL) {
                     /* do nothing - driver is last of list */
                 } else {
                     MSACM_RePositionDriver(padid, dwPriority);




More information about the wine-cvs mailing list