It will run loops + 1 times. After your change it does run loops times.
The intention was probably that this gets executed if the break in the
loop (trdy == dport->port.line) is reached. Without your fix, this
branch is also taken if the while-loop terminates with loops == -1
because of the postfix dec.
Your fix is correct but your changelog entry is wrong.
Hannes
--