lstrcpynW(part, comp, sizeof(part)/sizeof(part[0]));
comp = tmp;
/* now get the state */
- *strchrW(comp, ')') = 0;
+ tmp = strchrW(comp, ')');
+ if (!tmp)
+ return FALSE;
+ *tmp = 0;
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
}
else {
lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
comp = tmp;
/* now get the state */
- *strchrW(comp, ')') = 0;
+ tmp = strchrW(comp, ')');
+ if (!tmp)
+ return FALSE;
+ *tmp = 0;
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
}
else {
memset (state, 0, sizeof (*state));
state->metrics.cbSize = sizeof (NONCLIENTMETRICSW);
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW),
- (PVOID)&state->metrics, 0);
+ &state->metrics, 0);
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (LOGFONTW),
- (PVOID)&state->iconTitleFont, 0);
+ &state->iconTitleFont, 0);
}
static BOOL parse_handle_nonclient_font (struct PARSENONCLIENTSTATE* state,
if (state->metricsDirty)
{
SystemParametersInfoW (SPI_SETNONCLIENTMETRICS, sizeof (state->metrics),
- (PVOID)&state->metrics, 0);
+ &state->metrics, 0);
SystemParametersInfoW (SPI_SETICONTITLELOGFONT, sizeof (state->iconTitleFont),
- (PVOID)&state->iconTitleFont, 0);
+ &state->iconTitleFont, 0);
}
}
return TRUE;
*hasAlpha = TRUE;
- p = (BYTE*)dib.dsBm.bmBits;
- n = abs(dib.dsBmih.biHeight) * dib.dsBmih.biWidth;
+ p = dib.dsBm.bmBits;
+ n = dib.dsBmih.biHeight * dib.dsBmih.biWidth;
/* AlphaBlend() wants premultiplied alpha, so do that now */
while (n-- > 0)
{