capnspacehook / taskmaster

Windows Task Scheduler Library for Go
MIT License
142 stars 29 forks source link

TaskResult types are incorrect #30

Open fuzzyblock opened 2 years ago

fuzzyblock commented 2 years ago

Newly created tasks for me return SCHED_S_TASK_DISABLED (0x00041302), when instead they should return SCHED_S_TASK_HAS_NOT_RUN (0x00041303).

This seems to be due to the way iota is used here. It adds 1 to 0x00041300 when in fact it should at 0 for the first code SCHED_S_TASK_READY. I haven't checked the other types but I assume they all are shifted by 1 as well.