Mark Harmstone : uxtheme: Assume imagecount to be 1 if unspecified.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Mar 6 06:27:28 CST 2015


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

Author: Mark Harmstone <hellas at burntcomma.com>
Date:   Sat Feb 28 20:22:27 2015 +0000

uxtheme: Assume imagecount to be 1 if unspecified.

---

 dlls/uxtheme/draw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
index d6225d2..3ef8d81 100644
--- a/dlls/uxtheme/draw.c
+++ b/dlls/uxtheme/draw.c
@@ -257,6 +257,9 @@ static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iState
 
     imagenum = max (min (imagecount, iStateId), 1) - 1;
     GetObjectW(*hBmp, sizeof(bmp), &bmp);
+
+    if(imagecount < 1) imagecount = 1;
+
     if(imagelayout == IL_VERTICAL) {
         int height = bmp.bmHeight/imagecount;
         bmpRect->left = 0;




More information about the wine-cvs mailing list