[CpmlLine] Using -1 index to get the end point