Dmitry Timoshkov : mstask: Write correct trigger count to a job file.
Module: wine Branch: master Commit: e7987b1e4baef4230972c02ba23c90685ecaff86 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e7987b1e4baef4230972c02ba... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 17:17:35 2018 +0800 mstask: Write correct trigger count to a job file. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index f93aff1..986faa1 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -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;
participants (1)
-
Alexandre Julliard