Fix premature termination of middle snake outer loop
Fix premature termination of middle snake outer loop

Due to rounding dmax/2 the outer loop of the middle snake algorithm is
terminated before all the necessary paths are traversed. In the event
when no common symbols are present in a N=1 M=2 configuration, dmax/2
evaluates to 1.5 and the outer loop would terminate after d=1, instead
of after d=2.

Using Math.ceil and local variable dmax to fix the problem.


znerol/node-delta,znerol/node-delta,znerol/node-delta