Fix compilation error

error: iteration 100u invokes undefined behavior
[-Werror=aggressive-loop-optimizations]

Analogous to
https://github.com/LMMS/lmms/commit/ab55b26e4b1521e5401f60a2f618f31579e9cc5c

I have not checked whether this is the correct fix.