summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorDmitrii Morozov <dmitrii.morozov@sbb.ch>2025-06-23 13:37:33 +0200
committerDmitrii Morozov <dmitrii.morozov@sbb.ch>2025-06-23 13:37:33 +0200
commit37bb33ee55a098880adcf8f8efbcc7265853dc5e (patch)
treec1dfcee62d382dce17216737ac6e61043718d20d /index.html
parent09d3308ad4c39e137a7e2741b45a487b0bbf1791 (diff)
Fix out of range problemHEADmaster
Diffstat (limited to 'index.html')
-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];