vector.h was assuming that its members would be laid out consequtively in memory...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 27 Sep 2007 15:10:49 +0000 (15:10 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 27 Sep 2007 15:10:49 +0000 (15:10 +0000)
git-svn-id: http://svn.voria.com/code@775 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/vector.h

index 61314f1..13a3805 100644 (file)
@@ -79,11 +79,11 @@ public:
 
        value_type &
        operator[](const int& i)
-       { return (&_x)[i] ; }
+       { return i?_y:_x; }
 
        const value_type &
        operator[](const int& i) const
-       { return (&_x)[i] ; }
+       { return i?_y:_x; }
 
        const Vector &
        operator+=(const Vector &rhs)