/* $Id$
This file is part of libmspgl
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
if(*c<ATTRIB1)
throw InvalidState("Last component is not a generic attribute");
// VertexArray uses an unsigned to store flags for enabled arrays
- if(i<1 || i>28)
+ if(i>=28)
throw InvalidParameterValue("Generic attribute index out of range");
- *c+=(i-1)*4;
+ *c+=i*4;
return r;
}