mstask: Avoid an infinite loop in ITask::GetNextRunTime() if weekly trigger runs every week.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-05-23 15:47:55 +08:00 committed by Alexandre Julliard
parent 5eb8894e93
commit aad4302998
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ static HRESULT WINAPI MSTASK_ITask_GetNextRunTime(ITask *iface, SYSTEMTIME *rt)
}
}
if (st.wDayOfWeek == 0) /* Sunday, goto next week */
if (st.wDayOfWeek == 0 && This->trigger[i].Type.Weekly.WeeksInterval > 1) /* Sunday, goto next week */
filetime_add_weeks(&current_ft, This->trigger[i].Type.Weekly.WeeksInterval - 1);
else /* check next weekday */
filetime_add_days(&current_ft, 1);