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.
This commit is contained in:
Rob Shearman 2008-01-31 14:47:14 +00:00 committed by Alexandre Julliard
parent 51e2e1cc4b
commit 8cda4a8d90

View file

@ -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;