Skip to content
Snippets Groups Projects
Commit 5e9121a6 authored by Soeren Peters's avatar Soeren Peters
Browse files

Fix: Use data array from vector to access invalid element for end() iterator.

parent 00eae026
No related branches found
No related tags found
3 merge requests!403minor release 0.1.1,!402minor release 0.1.1,!396Fix: Use data array from vector to access invalid element for end() iterator.
......@@ -87,8 +87,8 @@ struct Distribution
iterator begin() { return &directions[0]; }
const_iterator begin() const { return &directions[0]; }
iterator end() { return &directions[dir_end + 1]; }
const_iterator end() const { return &directions[dir_end + 1]; }
iterator end() { return &directions.data()[dir_end + 1]; }
const_iterator end() const { return &directions.data()[dir_end + 1]; }
};
class Grid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment