- 
Ulrich Sibiller authoredxp must be declared outside the while loop! xp was reset in each interation despite being increased at the iteration's end! To protect against this happening again replace the while loop by a for loop that references xp. Bug introduced by d94f4727 fbfef7e6