summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.html b/index.html
index 4e19d97..99dee7f 100755
--- a/index.html
+++ b/index.html
@@ -40,7 +40,7 @@
let j = 0;
for (let i = 0; i < targetCount; i++) {
- while (j < distances.length - 1 && distances[j+1] < targetDist) j++;
+ while (j < distances.length - 2 && distances[j+1] < targetDist) j++;
const d1 = distances[j];
const d2 = distances[j+1];