Bug Wormwood counters loop infinitely when reloaded from the prefs file (from 3BH)

MCroft

Developer
Staff member
As reported by 3BH, the following pref line causes TurnCounter to go into an infinite loop and not complete.

Code:
relayCounters=4100\:Wormwood loc\=151 loc\=152 loc\=153 place.php?whichplace\=wormwood loc\=*\:tinybottle.gif\:4104\:Wormwood loc\=151 loc\=152 loc\=153 place.php?whichplace\=wormwood loc\=*\:tinybottle.gif\:4108\:Wormwood loc\=151 loc\=152 loc\=153 place.php?whichplace\=wormwood loc\=*\:tinybottle.gif

In the debugger, I see the first counter: Wormwood loc=151 loc=152 loc=153 place.php?whichplace=wormwood loc=*

A while loop in TurnCounter.java process it.

The first pass finds loc=*, the second pass finds the .php entry, the 3rd+ pass finds loc=153 and continues without changing the string or the position, which keeps it going over loc=153 infinitely.
 
Top