off by one error in CStarPattern