Skip to content

Commit

Permalink
Debug|libdeng2|Log: Added assert for possible out-of-range list access
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 22, 2013
1 parent cea7687 commit d3c33e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doomsday/libdeng2/src/core/memorylogsink.cpp
Expand Up @@ -65,8 +65,10 @@ int MemoryLogSink::entryCount() const
LogEntry const &MemoryLogSink::entry(int index) const
{
DENG2_GUARD(this);
DENG2_ASSERT(index >= 0);
DENG2_ASSERT(index < _entries.size());

return *_entries[index];
return *_entries.at(index);
}

void MemoryLogSink::remove(int pos, int n)
Expand Down

0 comments on commit d3c33e1

Please sign in to comment.