mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 09:46:18 +00:00
pyfec: loosen preconditions -- you can have up to 256 total shares, not up to 255 total shares
This commit is contained in:
parent
f7ddd89a90
commit
9c50c156dd
@ -110,8 +110,8 @@ Encoder_init(Encoder *self, PyObject *args, PyObject *kwdict) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be greater than or equal to 1, but it was %d", self->mm);
|
||||
return -1;
|
||||
}
|
||||
if (self->mm > 256) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 256, but it was %d", self->mm);
|
||||
if (self->mm > 255) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 255, but it was %d", self->mm);
|
||||
return -1;
|
||||
}
|
||||
if (self->kk > self->mm) {
|
||||
@ -363,8 +363,8 @@ Decoder_init(Encoder *self, PyObject *args, PyObject *kwdict) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be greater than or equal to 1, but it was %d", self->mm);
|
||||
return -1;
|
||||
}
|
||||
if (self->mm > 256) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 256, but it was %d", self->mm);
|
||||
if (self->mm > 255) {
|
||||
py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 255, but it was %d", self->mm);
|
||||
return -1;
|
||||
}
|
||||
if (self->kk > self->mm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user