stats: fix bug in assert for 2d vector
authorAli Saidi <Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)
src/base/statistics.hh

index cb63af7082b5e193040ea949e727fbf0ac0efc5f..67c09bb6ac3914263653a9bf492d86ba8f424149 100644 (file)
@@ -1231,7 +1231,7 @@ class Vector2dBase : public DataWrapVec2d<Derived, Vector2dInfoProxy>
     operator[](off_type index)
     {
         off_type offset = index * y;
-        assert (index >= 0 && offset + index < size());
+        assert (index >= 0 && offset + y <= size());
         return Proxy(this->self(), offset, y);
     }