Fix Buffer::changes_since if we get passed an invalid timestamp

This commit is contained in:
Maxime Coste 2015-12-12 23:50:01 +00:00
parent b6105fa106
commit 80b1d88bb0

View File

@ -91,8 +91,10 @@ inline size_t Buffer::timestamp() const
inline ConstArrayView<Buffer::Change> Buffer::changes_since(size_t timestamp) const
{
if (timestamp < m_changes.size())
return { m_changes.data() + timestamp,
m_changes.data() + m_changes.size() };
return {};
}
inline ByteCoord Buffer::back_coord() const