Mike Hearn : uxtheme: Fix GetThemeSysInt.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 7 13:30:52 CDT 2006


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

Author: Mike Hearn <mike at plan99.net>
Date:   Fri Apr  7 15:33:56 2006 +0100

uxtheme: Fix GetThemeSysInt.

TMT_FIRSTINT and TMT_LASTINT are the same value here, so the error
path would always be taken. Fix to check only that the values are
outside the possible range.

---

 dlls/uxtheme/metric.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/uxtheme/metric.c b/dlls/uxtheme/metric.c
index e8936dd..bfbec29 100644
--- a/dlls/uxtheme/metric.c
+++ b/dlls/uxtheme/metric.c
@@ -151,8 +151,8 @@ HRESULT WINAPI GetThemeSysInt(HTHEME hTh
     TRACE("(%p, %d)\n", hTheme, iIntID);
     if(!hTheme)
         return E_HANDLE;
-    if(iIntID <= TMT_FIRSTINT || iIntID >= TMT_LASTINT) {
-        TRACE("Unknown IntID: %d\n", iIntID);
+    if(iIntID < TMT_FIRSTINT || iIntID > TMT_LASTINT) {
+        WARN("Unknown IntID: %d\n", iIntID);
         return STG_E_INVALIDPARAMETER;
     }
     if((tp = MSSTYLES_FindMetric(TMT_INT, iIntID)))




More information about the wine-cvs mailing list