mstask: Write correct trigger count to a job file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ce57e5c4d7
commit
e7987b1e4b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue