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:
Veloman Yunkan 2020-06-02 21:53:47 +04:00 committed by GitHub
parent 4cdae3ca98
commit 05ef5d5f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ ByteRange::ByteRange(Kind kind, int64_t first, int64_t last)
{
assert(kind != NONE);
assert(first >= 0);
assert(last >= first);
assert(last >= first || (first == 0 && last == -1));
}
ByteRange::ByteRange(int64_t suffix_length)