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:
parent
5eb8894e93
commit
aad4302998
|
@ -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(¤t_ft, This->trigger[i].Type.Weekly.WeeksInterval - 1);
|
||||
else /* check next weekday */
|
||||
filetime_add_days(¤t_ft, 1);
|
||||
|
|
Loading…
Reference in New Issue