From 7d066d7f9db4218247bfc9eb7c5e90a74e5d8916 Mon Sep 17 00:00:00 2001 From: badlogic Date: Mon, 17 Dec 2018 15:25:06 +0100 Subject: [PATCH] [lua] Fix path constraint for when path length is NaN. See #1230. --- spine-lua/PathConstraint.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-lua/PathConstraint.lua b/spine-lua/PathConstraint.lua index c9f7f52c7..d6dd99040 100644 --- a/spine-lua/PathConstraint.lua +++ b/spine-lua/PathConstraint.lua @@ -252,7 +252,7 @@ function PathConstraint:computeWorldPositions (path, spacesCount, tangents, perc local pathLength = lengths[curveCount + 1]; if percentPosition then position = position * pathLength end if percentSpacing then - i = 0 + i = 1 while i < spacesCount do spaces[i + 1] = spaces[i + 1] * pathLength i = i + 1 @@ -395,7 +395,7 @@ function PathConstraint:computeWorldPositions (path, spacesCount, tangents, perc position = position * pathLength / path.lengths[curveCount]; end if percentSpacing then - i = 0 + i = 1 while i < spacesCount do spaces[i + 1] = spaces[i + 1] * pathLength i = i + 1