Skip to content

Commit

Permalink
Fix an uncaught exception in ComputeDistance.
Browse files Browse the repository at this point in the history
The index could have been -1.
  • Loading branch information
vicb committed Aug 19, 2020
1 parent 6a1c11a commit 8d024f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/viewer/logic/score/measure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Measure {
let distance;
for (let i = startIndex; i < stopIndex; ) {
distance = this.getDistance(ref, i);
if (distance > bound) {
if (distance >= bound) {
index = i;
bound = distance;
i++;
Expand Down

0 comments on commit 8d024f3

Please sign in to comment.