Commit aad43029 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 5eb8894e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment