nearestPointOnPath_pathtime_ bug

This code:

path = GSPath()
path.nodes = [
	GSNode((250,820), LINE),
	GSNode((350.0,820.0), OFFCURVE),
	GSNode((1150.0,820.0), OFFCURVE),
	GSNode((1250.0,820.0), CURVE),
print(path.nearestPointOnPath_pathTime_(NSMakePoint(1250,820), None))

returns (<NSPoint x=1250.0 y=820.0>, 6.0).

Why 6.0? I thought the integer part of “pathtime” was the “index of the node at the end of the segment”. But there’s only four nodes on that path. I would have expected 3.0. Something must be wrong because:


returns None.

thanks. Fixed it.