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
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ public abstract class PathBase implements IPath {
return this; return this;
} }
double factor = BaritoneAPI.getSettings().pathCutoffFactor.get(); 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); return new CutoffPath(this, newLength);
} }
} }