This commit is contained in:
Sean Owen 2021-08-30 20:06:44 -05:00
parent 73a3c3a704
commit dc6c8ea422

View file

@ -166,6 +166,9 @@ public final class ErrorCorrection {
ModulusPoly errorLocator,
int[] errorLocations) {
int errorLocatorDegree = errorLocator.getDegree();
if (errorLocatorDegree < 1) {
return new int[0];
}
int[] formalDerivativeCoefficients = new int[errorLocatorDegree];
for (int i = 1; i <= errorLocatorDegree; i++) {
formalDerivativeCoefficients[errorLocatorDegree - i] =