scummvm/scummvm — comment on commit 747ebffd17eb64423fd8fb321f9d803ec31105f4
File:  line 0
By lordhoto:

I guess what the old code tried to achieve was to set "no loops here" by assigning zero to _loop_counter before adaping the loop parameters below. Is it really sensible to set the loop count to anything before actually setting the loop parameters correctly? Not that it probably matters much, since an optimizer might have stripped the first assignment anyway.

Since the code mentions it is not threading safe, it make might more sense to "fix" this "properly" by making it threading safe.