Commit 208c0411 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

uxtheme: Use correct integral type.

parent 715a6bfc
...@@ -42,6 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme); ...@@ -42,6 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
*/ */
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value); static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
static BOOL MSSTYLES_GetNextLong(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LONG *value);
static BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize); static BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics); static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics);
static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LOGFONTW* logfont); static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LOGFONTW* logfont);
...@@ -1159,10 +1160,10 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha ...@@ -1159,10 +1160,10 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha
return img->image; return img->image;
} }
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value) static BOOL MSSTYLES_GetNextLong(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LONG *value)
{ {
LPCWSTR cur = lpStringStart; LPCWSTR cur = lpStringStart;
int total = 0; LONG total = 0;
BOOL gotNeg = FALSE; BOOL gotNeg = FALSE;
while(cur < lpStringEnd && (*cur < '0' || *cur > '9' || *cur == '-')) cur++; while(cur < lpStringEnd && (*cur < '0' || *cur > '9' || *cur == '-')) cur++;
...@@ -1183,6 +1184,11 @@ static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, ...@@ -1183,6 +1184,11 @@ static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd,
return TRUE; return TRUE;
} }
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
{
return MSSTYLES_GetNextLong(lpStringStart, lpStringEnd, lpValEnd, (LONG *)value);
}
static inline BOOL isSpace(WCHAR c) static inline BOOL isSpace(WCHAR c)
{ {
return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v';
...@@ -1377,10 +1383,10 @@ HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect) ...@@ -1377,10 +1383,10 @@ HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect)
LPCWSTR lpCur = tp->lpValue; LPCWSTR lpCur = tp->lpValue;
LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen; LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->left); MSSTYLES_GetNextLong(lpCur, lpEnd, &lpCur, &pRect->left);
MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->top); MSSTYLES_GetNextLong(lpCur, lpEnd, &lpCur, &pRect->top);
MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->right); MSSTYLES_GetNextLong(lpCur, lpEnd, &lpCur, &pRect->right);
if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->bottom)) { if(!MSSTYLES_GetNextLong(lpCur, lpEnd, &lpCur, &pRect->bottom)) {
TRACE("Could not parse rect property\n"); TRACE("Could not parse rect property\n");
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment