Fix stop condition in lineLoop()

This error was introduced when I was rewriting this for asm.js