Index: /trunk/nv/common.hh
===================================================================
--- /trunk/nv/common.hh	(revision 241)
+++ /trunk/nv/common.hh	(revision 242)
@@ -174,4 +174,10 @@
 	struct empty_type {};
 
+	template < int a, int b, int c, int d >
+	struct four_cc
+	{
+		static const unsigned int value = (((((d << 8) | c) << 8) | b) << 8) | a;
+	};
+
 } // namespace nv
 
Index: /trunk/nv/gfx/animation.hh
===================================================================
--- /trunk/nv/gfx/animation.hh	(revision 241)
+++ /trunk/nv/gfx/animation.hh	(revision 242)
@@ -165,5 +165,5 @@
 			if ( m_keys.size() == 0 ) return transform();
 			if ( m_keys.size() == 1 ) return m_keys[0];
-			size_t index = glm::clamp<size_t>( size_t( time ), 0, m_keys.size() - 1 );
+			size_t index = glm::clamp<size_t>( size_t( time ), 0, m_keys.size() - 2 );
 			float factor = glm::clamp<float> ( time - index, 0.0f, 1.0f );
 			return interpolate( m_keys[ index ], m_keys[ index + 1 ], factor );
