Module: wine
Branch: master
Commit: 8cda4a8d90c771bc677096ac944ea1a9605da696
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8cda4a8d90c771bc677096ac9…
Author: Rob Shearman <rob(a)codeweavers.com>
Date: Thu Jan 31 14:47:14 2008 +0000
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.
---
dlls/comctl32/animate.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index d6c84da..8343389 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -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;