Eventually
Eventually copied to clipboard
Line 81 - looking for an empty slot...
It uses i to seek an empty slot then puts the new even on the end (eventcount) anyway(!)
I was having problems - with events just disappearing (not being set up) - and traced it back to this.