Piotr Caban : mshtml: Fixed timer setting in remove_target_tasks.

Alexandre Julliard julliard at winehq.org
Mon Apr 29 13:55:24 CDT 2013


Module: wine
Branch: master
Commit: 448a621c5e18c28aafb0fb441f2f8acad020f6d0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=448a621c5e18c28aafb0fb441f2f8acad020f6d0

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Apr 29 14:41:05 2013 +0200

mshtml: Fixed timer setting in remove_target_tasks.

---

 dlls/mshtml/task.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c
index f9f12d5..6baac63 100644
--- a/dlls/mshtml/task.c
+++ b/dlls/mshtml/task.c
@@ -128,8 +128,10 @@ void remove_target_tasks(LONG target)
     }
 
     if(!list_empty(&thread_data->timer_list)) {
+        DWORD tc = GetTickCount();
+
         timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry);
-        SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL);
+        SetTimer(thread_data->thread_hwnd, TIMER_ID, max( (int)(timer->time - tc), 0 ), NULL);
     }
 
     while(thread_data->task_queue_head && thread_data->task_queue_head->target_magic == target) {




More information about the wine-cvs mailing list