Commit 8cda4a8d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

comctl32: In certain circumstances, native comctl32's animation control accepts…

comctl32: In certain circumstances, native comctl32's animation control accepts negative start positions for the ACM_PLAY message. These circumstances seems to be after a seek is performed, but we play it safe and allow negative start positions to be treated as zero always.
parent 51e2e1cc
......@@ -434,6 +434,10 @@ static LRESULT ANIMATE_Play(ANIMATE_INFO *infoPtr, UINT cRepeat, WORD wFrom, WOR
TRACE("(repeat=%d from=%d to=%d);\n",
infoPtr->nLoop, infoPtr->nFromFrame, infoPtr->nToFrame);
if (infoPtr->nFromFrame >= infoPtr->mah.dwTotalFrames &&
(SHORT)infoPtr->nFromFrame < 0)
infoPtr->nFromFrame = 0;
if (infoPtr->nFromFrame > infoPtr->nToFrame ||
infoPtr->nToFrame >= infoPtr->mah.dwTotalFrames)
return FALSE;
......
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