Commit bbee7ec7 authored by Sander van Leeuwen's avatar Sander van Leeuwen Committed by Alexandre Julliard

- Check for valid part nr in STATUSBAR_GetTextLength.

- TRACE fix in STATUSBAR_SetTextT; SBT_OWNERDRAW pointer isn't always a string pointer.
parent e656fc1c
...@@ -426,6 +426,10 @@ STATUSBAR_GetTextLength (STATUSWINDOWINFO *infoPtr, INT nPart) ...@@ -426,6 +426,10 @@ STATUSBAR_GetTextLength (STATUSWINDOWINFO *infoPtr, INT nPart)
DWORD result; DWORD result;
TRACE("part %d\n", nPart); TRACE("part %d\n", nPart);
/* MSDN says: "simple parts use index of 0", so this check is ok. */
if (nPart < 0 || nPart >= infoPtr->numParts) return 0;
if (infoPtr->simple) if (infoPtr->simple)
part = &infoPtr->part0; part = &infoPtr->part0;
else else
...@@ -627,7 +631,10 @@ STATUSBAR_SetTextT (STATUSWINDOWINFO *infoPtr, INT nPart, WORD style, ...@@ -627,7 +631,10 @@ STATUSBAR_SetTextT (STATUSWINDOWINFO *infoPtr, INT nPart, WORD style,
STATUSWINDOWPART *part=NULL; STATUSWINDOWPART *part=NULL;
BOOL changed = FALSE; BOOL changed = FALSE;
TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW)); if (style & SBT_OWNERDRAW) {
TRACE("part %d, text %x\n",nPart,text);
}
else TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW));
/* MSDN says: "If the parameter is set to SB_SIMPLEID (255), the status /* MSDN says: "If the parameter is set to SB_SIMPLEID (255), the status
* window is assumed to be a simple window */ * window is assumed to be a simple window */
......
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