mirror of https://github.com/kiwix/libkiwix.git
Assertion in ByteRange allows 0-sized content
The assertion in the ByteRange constructor was written under the assumption that the content must have non-zero size. Now it allows that corner case.
This commit is contained in:
parent
4cdae3ca98
commit
05ef5d5f51
|
@ -65,7 +65,7 @@ ByteRange::ByteRange(Kind kind, int64_t first, int64_t last)
|
||||||
{
|
{
|
||||||
assert(kind != NONE);
|
assert(kind != NONE);
|
||||||
assert(first >= 0);
|
assert(first >= 0);
|
||||||
assert(last >= first);
|
assert(last >= first || (first == 0 && last == -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteRange::ByteRange(int64_t suffix_length)
|
ByteRange::ByteRange(int64_t suffix_length)
|
||||||
|
|
Loading…
Reference in New Issue