X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexformat.cpp;h=91084bcc273e0bff6524746b22372a10d7b88eee;hp=232690ede2f99f2c7d1ebb8411d9ad442c68dffa;hb=bc3c82a86eeadde54be9fe32a8a8a76872ca99c3;hpb=b8fef9be469eb16e54068bac7e275ea225efc71c diff --git a/source/vertexformat.cpp b/source/vertexformat.cpp index 232690ed..91084bcc 100644 --- a/source/vertexformat.cpp +++ b/source/vertexformat.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -87,9 +87,9 @@ VertexFormat operator,(const VertexFormat &f, unsigned i) if(*c28) + if(i>=28) throw InvalidParameterValue("Generic attribute index out of range"); - *c+=(i-1)*4; + *c+=i*4; return r; }