fix crash when path length is exactly 30

This commit is contained in:
Leijurv 2018-12-05 18:01:23 -08:00
parent 87dbf1dbba
commit 245b2483ab
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -47,7 +47,7 @@ public abstract class PathBase implements IPath {
return this;
}
double factor = BaritoneAPI.getSettings().pathCutoffFactor.get();
int newLength = (int) ((length() - 1 - min) * factor) + min;
int newLength = (int) ((length() - min) * factor) + min - 1;
return new CutoffPath(this, newLength);
}
}