diff --git a/include/libtorrent/buffer.hpp b/include/libtorrent/buffer.hpp index 5dc2e558a..91ef58874 100644 --- a/include/libtorrent/buffer.hpp +++ b/include/libtorrent/buffer.hpp @@ -55,7 +55,7 @@ public: return begin[index]; } - int left() const { assert(end > begin); return end - begin; } + int left() const { assert(end >= begin); return end - begin; } char* begin; char* end; @@ -74,7 +74,7 @@ public: return begin[index]; } - int left() const { assert(end > begin); return end - begin; } + int left() const { assert(end >= begin); return end - begin; } char const* begin; char const* end;