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

mstask: Write correct trigger count to a job file.

parent ce57e5c4
......@@ -1133,9 +1133,6 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile)
hr = ITask_GetTriggerCount(task, &count);
if (hr != S_OK) return hr;
if (!WriteFile(hfile, &count, sizeof(count), &size, NULL))
return HRESULT_FROM_WIN32(GetLastError());
/* Windows saves a .job with at least 1 trigger */
if (!count)
{
......@@ -1146,6 +1143,9 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile)
count = 1;
}
if (!WriteFile(hfile, &count, sizeof(count), &size, NULL))
return HRESULT_FROM_WIN32(GetLastError());
for (i = 0; i < count; i++)
{
TASK_TRIGGER task_trigger;
......
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