added assert to protect against wrap-around
@@ -29,6 +29,7 @@ SimpleBuffer::evict(size_t bytes)
WritableMemory
SimpleBuffer::reserve(size_t bytes)
{
+ assert((_used + bytes) >= _used);
_data.resize(_used + bytes, char(0x55));
return WritableMemory(&_data[_used], bytes);
}
