Yeah, sorry, I already fixed it in the last push I made a few minutes ago. Apparently I made a mistake not merging my changes correctly with the code I pulled from bzr repo and forgetting that line. :)
Anyway, it is fixed. I'll try putting it in a different function though in a minute.
Re the calculation code, I think my current implementation would work fine (always non-negative): (currentNum + nOutput - 1) % nOutput
Yeah, sorry, I already fixed it in the last push I made a few minutes ago. Apparently I made a mistake not merging my changes correctly with the code I pulled from bzr repo and forgetting that line. :)
Anyway, it is fixed. I'll try putting it in a different function though in a minute.
Re the calculation code, I think my current implementation would work fine (always non-negative): (currentNum + nOutput - 1) % nOutput