diff --git a/random.hpp b/random.hpp index 895eee5c..df6bae08 100644 --- a/random.hpp +++ b/random.hpp @@ -38,7 +38,7 @@ namespace util { typename T::iterator cursor = container.begin (); typename T::size_type size = container.size (); typename T::size_type offset = random () % size; - + std::advance (cursor, offset); return *cursor; }