Peter Jamieson - 2015-12-16

This still fails if the word is the first of only 2 items in a list (lwm = 0, hwm = 1).
Putting the following before the for(;;) loop fixes the issue though: -

if(lwm == 0)
{
    lwm = -1;
}

Although we could alter the population of hwms array to remove the need for this though.

 
Last edit: Peter Jamieson 2015-12-16